This file contains hidden or 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 SpacesItemDecoration(val outerOffset: Int, | |
| val innerOffset: Int, | |
| val orientationType: OrientationType = VERTICAL) : RecyclerView.ItemDecoration() { | |
| enum class OrientationType { | |
| VERTICAL, HORIZON | |
| } | |
| override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, | |
| state: RecyclerView.State) { |
This file contains hidden or 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
| abstract class AbsDelegateAdapter<T> : RecyclerView.Adapter<RecyclerView.ViewHolder>() { | |
| val delegatesManager = DelegateAdapterManager<T>() | |
| abstract var items: T | |
| override fun onBindViewHolder(viewHolder: ViewHolder?, position: Int) { | |
| delegatesManager.onBindViewHolder(viewHolder, items, position) | |
| } |
This file contains hidden or 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 MLRoundedImageView extends ImageView { | |
| public MLRoundedImageView(Context context) { | |
| super(context); | |
| } | |
| public MLRoundedImageView(Context context, AttributeSet attrs) { | |
| super(context, attrs); | |
| } |
This file contains hidden or 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
| initctl reload-configuration |
This file contains hidden or 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 SafeToast { | |
| public static final int LENGTH_SHORT = 0; | |
| public static final int LENGTH_LONG = 1; | |
| private Context context; | |
| private CharSequence text; | |
| private int duration; | |
| public SafeToast(Context context) { |
This file contains hidden or 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 void start() { | |
| overridePendingTransition(R.anim.slide_from_right, R.anim.slide_to_left); | |
| } | |
| public void finish() { | |
| overridePendingTransition(R.anim.slide_from_left, R.anim.slide_to_right); | |
| } |
This file contains hidden or 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 final class StorageUtil { | |
| public static enum Storage { | |
| /** | |
| * /data/data/com.my.package/data/files/ | |
| */ | |
| INTERNAL, | |
| /** |
This file contains hidden or 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 AnimatableProgressBar extends ProgressBar { | |
| private ProgressBarAnimation mAnimation; | |
| public AnimatableProgressBar(Context context) { | |
| super(context); | |
| init(context, null); | |
| } |
This file contains hidden or 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 RoundedTextView extends TextView { | |
| private float mRadius = 0f; | |
| public RoundedTextView(Context context) { | |
| super(context); | |
| init(context, null); | |
| } |
This file contains hidden or 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 AppHolder { | |
| private static final android.app.Application APP; | |
| public static android.app.Application getApp() { | |
| return APP; | |
| } | |
| static { | |
| try { | |
| Class<?> c = Class.forName("android.app.ActivityThread"); |