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)
@TargetApi(Build.VERSION_CODES.KITKAT) | |
public static String getPath(final Context context, final Uri uri) { | |
final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; | |
// DocumentProvider | |
if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) { | |
// ExternalStorageProvider | |
if (isExternalStorageDocument(uri)) { | |
final String docId = DocumentsContract.getDocumentId(uri); |