This repository was archived by the owner on Oct 13, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed
src/main/java/net/yazeed44/imagepicker Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 100100 <orderEntry type =" library" exported =" " name =" support-v4-23.0.0" level =" project" />
101101 <orderEntry type =" library" exported =" " name =" glide-3.6.1" level =" project" />
102102 <orderEntry type =" library" exported =" " name =" material-dialogs-0.7.9.1" level =" project" />
103- <orderEntry type =" library" exported =" " name =" robospice-cache- 1.4.14" level =" project" />
103+ <orderEntry type =" library" exported =" " name =" robospice-1.4.14" level =" project" />
104104 <orderEntry type =" library" exported =" " name =" commons-io-1.3.2" level =" project" />
105+ <orderEntry type =" library" exported =" " name =" robospice-cache-1.4.14" level =" project" />
105106 <orderEntry type =" library" exported =" " name =" support-annotations-23.0.0" level =" project" />
106- <orderEntry type =" library" exported =" " name =" robospice-1.4.14" level =" project" />
107107 <orderEntry type =" module" module-name =" imagepicker" exported =" " />
108108 </component >
109109</module >
Original file line number Diff line number Diff line change 9393 <orderEntry type =" library" exported =" " name =" eventbus-2.4.0" level =" project" />
9494 <orderEntry type =" library" exported =" " name =" design-23.0.0" level =" project" />
9595 <orderEntry type =" library" exported =" " name =" floatingactionbutton-1.3.0" level =" project" />
96+ <orderEntry type =" library" exported =" " name =" robospice-1.4.14" level =" project" />
9697 <orderEntry type =" library" exported =" " name =" commons-io-1.3.2" level =" project" />
9798 <orderEntry type =" library" exported =" " name =" robospice-cache-1.4.14" level =" project" />
98- <orderEntry type =" library" exported =" " name =" robospice-1.4.14" level =" project" />
9999 <orderEntry type =" library" exported =" " name =" appcompat-v7-23.0.0" level =" project" />
100100 <orderEntry type =" library" exported =" " name =" recyclerview-v7-23.0.0" level =" project" />
101101 <orderEntry type =" library" exported =" " name =" library-1.2.3" level =" project" />
Original file line number Diff line number Diff line change @@ -133,11 +133,12 @@ private void initActionbar(final Bundle savedInstanceState) {
133133
134134
135135 if (savedInstanceState == null ) {
136- getSupportActionBar ().setDisplayHomeAsUpEnabled (false );
136+ mShouldShowUp = mPickOptions .backBtnInMainActivity ;
137+ getSupportActionBar ().setDisplayHomeAsUpEnabled (mPickOptions .backBtnInMainActivity );
137138 getSupportActionBar ().setTitle (R .string .albums_title );
138139 } else {
139140 mShouldShowUp = savedInstanceState .getBoolean (KEY_SHOULD_SHOW_ACTIONBAR_UP );
140- getSupportActionBar ().setDisplayHomeAsUpEnabled (mShouldShowUp );
141+ getSupportActionBar ().setDisplayHomeAsUpEnabled (mShouldShowUp && mPickOptions . backBtnInMainActivity );
141142 getSupportActionBar ().setTitle (savedInstanceState .getString (KEY_ACTION_BAR_TITLE ));
142143
143144
@@ -457,7 +458,7 @@ public void onBackPressed() {
457458 //Return to albums fragment
458459 getSupportFragmentManager ().popBackStack ();
459460 getSupportActionBar ().setTitle (R .string .albums_title );
460- mShouldShowUp = false ;
461+ mShouldShowUp = mPickOptions . backBtnInMainActivity ;
461462 getSupportActionBar ().setDisplayHomeAsUpEnabled (mShouldShowUp );
462463 hideSelectAll ();
463464 hideDeselectAll ();
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public final class Picker {
4141 public final int doneFabIconTintColor ;
4242 public final boolean shouldShowCaptureMenuItem ;
4343 public final int checkIconTintColor ;
44+ public final boolean backBtnInMainActivity ;
4445
4546
4647 private Picker (final Builder builder ) {
@@ -63,6 +64,7 @@ private Picker(final Builder builder) {
6364 doneFabIconTintColor = builder .mDoneFabIconTintColor ;
6465 shouldShowCaptureMenuItem = builder .mShouldShowCaptureMenuItem ;
6566 checkIconTintColor = builder .mCheckIconTintColor ;
67+ backBtnInMainActivity = builder .mBackBtnInMainActivity ;
6668
6769
6870
@@ -112,6 +114,7 @@ public static class Builder {
112114 private int mCaptureItemIconTintColor ;
113115 private boolean mShouldShowCaptureMenuItem ;
114116 private int mCheckIconTintColor ;
117+ private boolean mBackBtnInMainActivity ;
115118
116119
117120 //Use (Context,PickListener,themeResId) instead
@@ -252,6 +255,11 @@ public Picker.Builder setCheckIconTintColor(@ColorInt final int color) {
252255 return this ;
253256 }
254257
258+ public Picker .Builder setBackBtnInMainActivity (final boolean backBtn ) {
259+ mBackBtnInMainActivity = backBtn ;
260+ return this ;
261+ }
262+
255263
256264 public Picker build () {
257265 return new Picker (this );
You can’t perform that action at this time.
0 commit comments