File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
sample/src/main/java/com/afollestad/materialdialogssample Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 1
1
package com .afollestad .materialdialogssample ;
2
2
3
3
import android .Manifest ;
4
+ import android .annotation .TargetApi ;
4
5
import android .content .DialogInterface ;
5
6
import android .content .Intent ;
6
7
import android .content .pm .PackageManager ;
@@ -581,6 +582,7 @@ public void onDismiss(DialogInterface dialog) {
581
582
.show ();
582
583
}
583
584
585
+ @ TargetApi (Build .VERSION_CODES .JELLY_BEAN )
584
586
@ OnClick (R .id .file_chooser )
585
587
public void showFileChooser () {
586
588
if (ActivityCompat .checkSelfPermission (MainActivity .this , Manifest .permission .READ_EXTERNAL_STORAGE ) !=
@@ -597,6 +599,7 @@ public void onFileSelection(@NonNull File file) {
597
599
showToast (file .getAbsolutePath ());
598
600
}
599
601
602
+ @ TargetApi (Build .VERSION_CODES .JELLY_BEAN )
600
603
@ OnClick (R .id .folder_chooser )
601
604
public void showFolderChooser () {
602
605
if (ActivityCompat .checkSelfPermission (MainActivity .this , Manifest .permission .READ_EXTERNAL_STORAGE ) !=
You can’t perform that action at this time.
0 commit comments