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 DateTimeAwareJSONEncoder(json.JSONEncoder): | |
| """ | |
| A JSONEncoder subclass for handling objects of types `timedelta`, `datetime` and `date` | |
| """ | |
| def default(self, obj): | |
| if isinstance(obj, datetime): | |
| return { | |
| '__type__': 'datetime', | |
| 'year': obj.year, | |
| 'month': obj.month, |
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
| package vmax.myway; | |
| import android.animation.LayoutTransition; | |
| import android.util.Log; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| public class LayoutTransitionLogger implements LayoutTransition.TransitionListener { | |
| private String logTAG; |
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
| import android.content.Context; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| public class EmptyRecyclerView extends RecyclerView { | |
| private View emptyView, nonEmptyView; | |
| final private AdapterDataObserver observer = new AdapterDataObserver() { |
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
| import android.content.Context; | |
| import android.os.Handler; | |
| import android.os.Message; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| import android.widget.AutoCompleteTextView; | |
| import android.widget.ProgressBar; | |
| public class DelayAutoCompleteTextView extends AutoCompleteTextView { |
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 ViewWeightAnimationWrapper { | |
| private View view; | |
| public ViewWeightAnimationWrapper(View view) { | |
| if (view.getLayoutParams() instanceof LinearLayout.LayoutParams) { | |
| this.view = view; | |
| } else { | |
| throw new IllegalArgumentException("The view should have LinearLayout as parent"); | |
| } | |
| } |