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
private const val ROUTER_STATES_KEY = "STATE" | |
/** | |
* This is the base implementation of a [Controller] which works hand in hand with the [BottomNavigationView]. | |
* | |
* It is designed to work like that: | |
* * [Textual explanation](https://i.imgur.com/EqqQyOY.png) | |
* * [Visual explanation](https://i.imgur.com/FDb6EGU.png) | |
* | |
* In other words. It should be behave exactly like the [iOS TabBar](http://apple.co/2y6XIrL) |
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
package com.pascalwelsch.extensions | |
import android.app.Activity | |
import android.content.Context | |
import android.content.Intent | |
import android.os.Build | |
import android.os.Bundle | |
/** | |
* Extensions for simpler launching of Activities |
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
/** | |
* An enhanced {@code CheckBox} that differentiates between user clicks and | |
* programmatic clicks. In particular, the {@code OnCheckedChangeListener} is | |
* <strong>not</strong> triggered when the state of the checkbox is changed | |
* programmatically. | |
* | |
*/ | |
public class EnhancedCheckBox extends CheckBox implements ProgrammaticallyCheckable{ | |
private CompoundButton.OnCheckedChangeListener mListener = null; | |
public EnhancedCheckBox(Context context) { |
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
package com.pascalwelsch.utils; | |
import android.support.annotation.Nullable; | |
import android.support.v7.util.DiffUtil; | |
import android.support.v7.widget.RecyclerView; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
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
public class MyApp extends Application { | |
@Override | |
public void onCreate() { | |
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf | |
} | |
} |