This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FontsReplacer { | |
@SuppressWarnings("unchecked") | |
public static void replaceFonts(Context context) { | |
try { | |
//we need to change all static fields contains fonts: | |
//1. static constants | |
setStaticFinalField(Typeface.class, "DEFAULT", FontCache.getTypeface(context, Typeface.NORMAL)); | |
setStaticFinalField(Typeface.class, "DEFAULT_BOLD", FontCache.getTypeface(context, Typeface.BOLD)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.arch.lifecycle.LiveData | |
import android.content.Context | |
import android.net.ConnectivityManager | |
import android.net.Network | |
import android.net.NetworkRequest | |
class OnlineLiveData(context: Context) : LiveData<Boolean>() { | |
private val availableNetworks = mutableSetOf<Network>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.gson.JsonElement; | |
import java.math.BigDecimal; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class JsonUtils { | |
public static final int MARKERS_COUNT_MAX = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Pair; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import org.reactivestreams.Publisher; | |
import java.io.File; | |
import java.util.Arrays; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.ServiceConnection; | |
import android.os.IBinder; | |
import io.reactivex.SingleEmitter; | |
import io.reactivex.SingleOnSubscribe; | |
import io.reactivex.annotations.NonNull; | |
import io.reactivex.disposables.Disposable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see code files below |