Instead of the verbose setOnClickListener
:
RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));
Observable
.just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
## Android architecture components: Lifecycle | |
# LifecycleObserver's empty constructor is considered to be unused by proguard | |
-keepclassmembers class * implements android.arch.lifecycle.LifecycleObserver { | |
<init>(...); | |
} | |
# ViewModel's empty constructor is considered to be unused by proguard | |
-keepclassmembers class * extends android.arch.lifecycle.ViewModel { | |
<init>(...); | |
} | |
# keep Lifecycle State and Event enums values |
import java.util.List; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.content.pm.ProviderInfo; | |
import android.content.pm.ResolveInfo; | |
import android.text.TextUtils; | |
/** |
package com.github.manuelpeinado.toolbartest; | |
import android.graphics.Color; | |
import android.graphics.drawable.Drawable; | |
import android.os.Bundle; | |
import android.support.v7.app.ActionBarActivity; | |
import android.support.v7.widget.Toolbar; | |
import android.view.Menu; | |
import android.view.View; |
Apache License | |
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. | |
"License" shall mean the terms and conditions for use, reproduction, |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
# This is a wrapper for adb. If there are multiple devices / emulators, this script will prompt for which device to use | |
# Then it'll pass whatever commands to that specific device or emulator. | |
# Run adb devices once, in event adb hasn't been started yet | |
BLAH=$(adb devices) | |
# Grab the IDs of all the connected devices / emulators | |
IDS=($(adb devices | sed '1,1d' | sed '$d' | cut -f 1 | sort)) |
/** | |
* A base class that provides a consistent interface for FormModel-like objects | |
*/ | |
public abstract class BaseFormModel extends LinearLayout implements FormModel { | |
protected Context mContext; | |
public BaseFormModel(Context context) { | |
super(context); | |
setup(context); |
#The Great Firewall (GFW) Contributors List
注:数据来源为 dblp 和 cndblp, 下面括号中的数字表示 dblp 中显示的跟方滨兴合作论文的数量
###Binxing Fang (方滨兴)
中国工程院院士,北京邮电大学教授,中国科学院计算技术研究所网络方向首席科学家
http://en.wikipedia.org/wiki/Fang_Binxing