fix
This commit is contained in:
parent
c45f144b10
commit
c72429aa67
|
@ -33,6 +33,7 @@ public class FileBrowser implements Serializable {
|
|||
private String initDir = Environment.getExternalStorageDirectory().getAbsolutePath();
|
||||
private ArrayList<String> suffix = new ArrayList<>();
|
||||
private String title;
|
||||
private int code;
|
||||
|
||||
public FileBrowser(String title) {
|
||||
this.title = title;
|
||||
|
@ -58,11 +59,16 @@ public class FileBrowser implements Serializable {
|
|||
return title;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void browse(Activity activity, int code, ResultListener.Listener listener) {
|
||||
Intent intent = new Intent(activity, FileBrowserActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("config", this);
|
||||
intent.putExtras(bundle);
|
||||
this.code = code;
|
||||
ResultListener.startActivityForResult(activity, intent, code, listener);
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ public class FileBrowserActivity extends FCLActivity implements View.OnClickList
|
|||
listView = findViewById(R.id.list);
|
||||
refreshList(currentPath != null ? currentPath : new File(fileBrowser.getInitDir()).toPath());
|
||||
|
||||
if (fileBrowser.getLibMode() != LibMode.FILE_CHOOSER) {
|
||||
if (fileBrowser.getLibMode() != LibMode.FILE_CHOOSER || fileBrowser.getCode() != 400) {
|
||||
selectExternal.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue