Skip to content

Instantly share code, notes, and snippets.

View shumelchyk's full-sized avatar

Kseniia Shumelchyk shumelchyk

View GitHub Profile
@shumelchyk
shumelchyk / Type.kt
Created May 5, 2023 15:58
Customize font padding
@Composable
fun Typography.withoutFontPadding() = remember(this) {
val platformStyle = PlatformTextStyle(includeFontPadding = false)
this.copy(
display1 = this.display1.copy(platformStyle = platformStyle),
display2 = this.display2.copy(platformStyle = platformStyle),
display3 = this.display3.copy(platformStyle = platformStyle),
title1 = this.title1.copy(platformStyle = platformStyle),
title2 = this.title2.copy(platformStyle = platformStyle),
title3 = this.title3.copy(platformStyle = platformStyle),
public class FirebaseNotificationReceiver extends WakefulBroadcastReceiver {
private static final String ACTION_TO_SKIP = "com.google.android.c2dm.intent.RECEIVE";
@Inject
DataManager data;
public FirebaseNotificationReceiver() {
super();
App.getAppComponent().inject(this);
@shumelchyk
shumelchyk / Independant custom dimension
Created September 20, 2017 16:17
Custom dimensions
// TrackHelper class
public Dimension dimension(int id, String value) {
return new Dimension(mBaseTrackMe).dimension(id, value);
}
public static class Dimension extends TrackHelper {
// TrackMe - track event that is collected by dispatcher and send to server
Dimension(TrackMe base) {
super(base);
}
@shumelchyk
shumelchyk / AssetExtractor.java
Created July 17, 2016 13:21
AssetExtractor code
package com.google.appinventor.components.runtime;
import android.content.res.AssetManager;
import android.os.Environment;
import com.google.appinventor.components.annotations.*;
import com.google.appinventor.components.common.ComponentCategory;
import com.google.appinventor.components.common.PropertyTypeConstants;
import com.google.appinventor.components.common.YaVersion;
import com.google.appinventor.components.runtime.util.FileUtil;