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 static class LambdaTestJava { | |
| public void javaLambda(JavaCallback callback) { | |
| callback.ooo("java from java"); | |
| } | |
| public void ktLambda(LambdaTestKt.KtCallback callback) { | |
| callback.ooo("kt from java"); | |
| } | |
| public interface JavaCallback{ |
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 enum FirebaseScreen { | |
| NEWS(NewsFragment.class, "news"), | |
| BLOG_POST(BlogPostActivity.class, "blog_post"); | |
| private final Class className; | |
| private final String screenName; | |
| FirebaseScreen(Class className, String screenName) { | |
| this.className = className; |
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
| //use | |
| FirebaseTracker.getInstance() | |
| .event("") | |
| .add("", "") | |
| .add("", 1) | |
| .add("", false) | |
| .send(); | |
| public static class FirebaseTracker { |
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 CountLiveData extends LiveData<String> { | |
| private static final String TAG = "___CountLiveData"; | |
| private int count = 0; | |
| private Handler handler = new Handler(); | |
| private Runnable runnable = new Runnable() { | |
| @Override | |
| public void run() { | |
| setValue(String.valueOf(count++)); | |
| posts(); |
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 ObservableMap<T> { | |
| private final Map<String, T> map = new HashMap<>(); | |
| public Observable<T> findByKey(String key) { | |
| if (map.containsKey(key)) { | |
| return Observable.just(map.get(key)); | |
| } | |
| return Observable.just(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
| //refer https://github.com/DroidKaigi/conference-app-2017/pull/158 | |
| public InfoRowView(Context context, AttributeSet attrs, int defStyleAttr) { | |
| super(context, attrs, defStyleAttr); | |
| if (isInEditMode()) { | |
| inflate(context, R.layout.view_info_row, this); | |
| initView(attrs, ((TextView) findViewById(R.id.txt_info_title)), ((TextView) findViewById(R.id.txt_info_description))); | |
| return; | |
| } | |
| binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.view_info_row, this, true); |
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
| //src: http://kurrytran.blogspot.ru/2014/05/android-studio-list-of-suppress-warning.html | |
| //https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/adt-branding/src/META-INF/AndroidIdePlugin.xml | |
| //https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/android/src/META-INF/plugin.xml | |
| //Most Common Annotations | |
| @SuppressWarnings("all") | |
| @SuppressWarnings("unchecked") | |
| @SuppressWarnings({"JavaDoc"}) | |
| @SuppressWarnings({"UnusedDeclaration"}) |