GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixed #113 and #114 · SagarDep/Android-FilePicker@6281459

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app/src/main/java/vi/filepicker
    • MainActivity.java
  • filepicker
    • build.gradle
    • src/main/java/droidninja/filepicker
      • MediaDetailsActivity.java
      • PickerManager.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎app/src/main/java/vi/filepicker/MainActivity.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/vi/filepicker/MainActivity.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ public void onPickPhoto() {
104104
.enableVideoPicker(true)
105105
.enableCameraSupport(true)
106106
.showGifs(false)
107-
.showFolderView(false)
108-
.enableSelectAll(false)
107+
.showFolderView(true)
108+
.enableSelectAll(true)
109109
.enableImagePicker(true)
110110
.setCameraPlaceholder(R.drawable.custom_camera)
111111
.withOrientation(Orientation.UNSPECIFIED)
Collapse file

‎filepicker/build.gradle‎

Copy file name to clipboardExpand all lines: filepicker/build.gradle
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: "com.jfrog.bintray"
44

5-
version = "2.1.0"
5+
version = "2.1.1"
66

77
android {
88
compileSdkVersion 26
Collapse file

‎filepicker/src/main/java/droidninja/filepicker/MediaDetailsActivity.java‎

Copy file name to clipboardExpand all lines: filepicker/src/main/java/droidninja/filepicker/MediaDetailsActivity.java
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected void initView() {
6363
if(photoDirectory!=null) {
6464

6565
setUpView(photoDirectory);
66-
setTitle(photoDirectory.getName());
66+
setTitle(0);
6767
}
6868
}
6969
}
@@ -173,7 +173,16 @@ public int compare(Media a, Media b) {
173173
photoGridAdapter = new PhotoGridAdapter(this, mGlideRequestManager, (ArrayList<Media>) medias,PickerManager.getInstance().getSelectedPhotos(),false, this);
174174
recyclerView.setAdapter(photoGridAdapter);
175175
}
176-
onItemSelected();
176+
177+
if(PickerManager.getInstance().getMaxCount()==-1){
178+
if(photoGridAdapter!=null && selectAllItem!=null) {
179+
if (photoGridAdapter.getItemCount() == photoGridAdapter.getSelectedItemCount()) {
180+
selectAllItem.setIcon(R.drawable.ic_select_all);
181+
selectAllItem.setChecked(true);
182+
}
183+
}
184+
setTitle(PickerManager.getInstance().getCurrentCount());
185+
}
177186
}
178187

179188
private void resumeRequestsIfNotDestroyed() {
@@ -189,7 +198,6 @@ public boolean onCreateOptionsMenu(Menu menu) {
189198
getMenuInflater().inflate(R.menu.media_detail_menu, menu);
190199
selectAllItem = menu.findItem(R.id.action_select);
191200
selectAllItem.setVisible(PickerManager.getInstance().hasSelectAll());
192-
onItemSelected();
193201
return super.onCreateOptionsMenu(menu);
194202
}
195203

@@ -233,15 +241,7 @@ public void onItemSelected() {
233241
setResult(RESULT_OK, null);
234242
finish();
235243
}
236-
else if(maxCount==-1){
237-
if(photoGridAdapter!=null && selectAllItem!=null) {
238-
if (photoGridAdapter.getItemCount() == photoGridAdapter.getSelectedItemCount()) {
239-
selectAllItem.setIcon(R.drawable.ic_select_all);
240-
selectAllItem.setChecked(true);
241-
}
242-
}
243-
setTitle(PickerManager.getInstance().getCurrentCount());
244-
}
244+
setTitle(PickerManager.getInstance().getCurrentCount());
245245
}
246246

247247
@Override
Collapse file

‎filepicker/src/main/java/droidninja/filepicker/PickerManager.java‎

Copy file name to clipboardExpand all lines: filepicker/src/main/java/droidninja/filepicker/PickerManager.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static PickerManager getInstance() {
3030

3131
private boolean showGif;
3232

33-
private boolean showSelectAll;
33+
private boolean showSelectAll = false;
3434

3535
private boolean docSupport = true;
3636

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.