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.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.Checkable; | |
import android.widget.LinearLayout; | |
import java.util.HashSet; | |
import java.util.Set; | |
public class CheckableLinearLayout extends LinearLayout implements Checkable { |
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 java.util.Timer; | |
import java.util.TimerTask; | |
public class TimerUtils { | |
private TimerTask timerTask; | |
private Timer timer; | |
private Action action; | |
public void start(Action action, int delay) { | |
this.action = action; |
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 abstract class BaseMainFragment extends Fragment { | |
@Override | |
public Animation onCreateAnimation(int transit, final boolean enter, int nextAnim) { | |
if (nextAnim == R.animator.next_fragment_anim) { | |
Animation nextAnimation = AnimationUtils.loadAnimation(getContext(), nextAnim); | |
nextAnimation.setAnimationListener(new Animation.AnimationListener() { | |
private float startZ = 0f; | |
@Override |
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.app.Activity; | |
import android.view.View; | |
import android.view.ViewTreeObserver; | |
public class KeyboardVisibilityUtils { | |
private int appHeight; | |
private final View contentView; | |
private ViewTreeObserver.OnGlobalLayoutListener layoutListener; | |
public KeyboardVisibilityUtils(Activity activity) { |
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.graphics.Paint; | |
import android.graphics.Typeface; | |
import android.text.TextPaint; | |
import android.text.style.TypefaceSpan; | |
public class CustomTypefaceSpan extends TypefaceSpan { | |
private final Typeface newType; | |
public CustomTypefaceSpan(String family, Typeface type) { | |
super(family); |
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.app.Application; | |
import timber.log.Timber; | |
public class App extends Application { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
if (BuildConfig.DEBUG) { |
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
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2019 Arman | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2019 Arman | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
<?xml version="1.0" encoding="utf-8"?> | |
<ripple | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:color="?colorControlHighlight"> | |
<item android:id="@android:id/mask"> | |
<shape android:shape="rectangle"> | |
<solid android:color="#f7f7f7" /> | |
<corners android:radius="10dp" /> | |
</shape> |
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
class AppLauncher @Inject constructor( | |
private val launchUseCase: LaunchUseCase, | |
private val router: Router | |
) { | |
fun launch() { | |
val rootScreen = | |
if (launchUseCase.hasAccount) Screens.Home | |
else Screens.Auth | |
if (launchUseCase.isFirstLaunch) { |
OlderNewer