Skip to content

Commit e30f773

Browse files
Merge pull request #2 from smartdevelopers-ir/new_video_view
2021/12/02
2 parents 90189f0 + 8a75f98 commit e30f773

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

SmartFileBrowser/src/main/java/ir/smartdevelopers/smartfilebrowser/acitivties/FileBrowserMainActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,10 @@ private void sendBackResult(FileModel model) {
789789
Bundle bundle = new Bundle();
790790
bundle.putStringArray(EXTRA_RESULT, filesPath);
791791
bundle.putParcelableArray(EXTRA_RESULT_URIS, filesUri);
792+
Bundle sfbExtra=getIntent().getBundleExtra("sfb_extra");
793+
if (sfbExtra!=null){
794+
bundle.putBundle("sfb_extra",sfbExtra);
795+
}
792796
result.putExtras(bundle);
793797

794798
setResult(RESULT_OK, result);

SmartFileBrowser/src/main/java/ir/smartdevelopers/smartfilebrowser/customClasses/SmartFileBrowser.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public static class IntentBuilder{
3030
private boolean showAudioTab=true;
3131
private boolean showGalleryTab=true;
3232
private boolean showPickFromSystemGalleyMenu=true;
33+
private Bundle mExtra;
3334

3435
public IntentBuilder setShowVideosInGallery(boolean showVideosInGallery) {
3536
this.showVideosInGallery = showVideosInGallery;
@@ -86,6 +87,7 @@ public Intent build(Context context){
8687
filePickerIntent.putExtra("mShowGalleryTab",showGalleryTab);
8788
filePickerIntent.putExtra("mFileTabFileFilter",mFileFilter);
8889
filePickerIntent.putExtra("mShowPickFromSystemGalleryMenuButton",showPickFromSystemGalleyMenu);
90+
filePickerIntent.putExtra("sfb_extra",mExtra);
8991
return filePickerIntent;
9092
}
9193

@@ -98,6 +100,11 @@ public IntentBuilder setShowPickFromSystemGalleyMenu(boolean showPickFromSystemG
98100
this.showPickFromSystemGalleyMenu = showPickFromSystemGalleyMenu;
99101
return this;
100102
}
103+
104+
public IntentBuilder setExtra(Bundle extra) {
105+
mExtra = extra;
106+
return this;
107+
}
101108
}
102109

103110
@Nullable
@@ -137,4 +144,14 @@ public static Uri[] getResultUris(Intent data){
137144
}
138145
return result;
139146
}
147+
public static Bundle getExtra(Intent data){
148+
if (data==null){
149+
return null;
150+
}
151+
Bundle bundle=data.getExtras();
152+
if (bundle==null){
153+
return null;
154+
}
155+
return bundle.getBundle("sfb_extra");
156+
}
140157
}

0 commit comments

Comments
 (0)