Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Commit

Permalink
Implemented #74
Browse files Browse the repository at this point in the history
  • Loading branch information
yazeed44 committed Sep 17, 2015
1 parent 8cfb1d7 commit 72f9c04
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@
<orderEntry type="library" exported="" name="support-v4-23.0.0" level="project" />
<orderEntry type="library" exported="" name="glide-3.6.1" level="project" />
<orderEntry type="library" exported="" name="material-dialogs-0.7.9.1" level="project" />
<orderEntry type="library" exported="" name="robospice-cache-1.4.14" level="project" />
<orderEntry type="library" exported="" name="robospice-1.4.14" level="project" />
<orderEntry type="library" exported="" name="commons-io-1.3.2" level="project" />
<orderEntry type="library" exported="" name="robospice-cache-1.4.14" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" />
<orderEntry type="library" exported="" name="robospice-1.4.14" level="project" />
<orderEntry type="module" module-name="imagepicker" exported="" />
</component>
</module>
2 changes: 1 addition & 1 deletion imagepicker/imagepicker.iml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@
<orderEntry type="library" exported="" name="eventbus-2.4.0" level="project" />
<orderEntry type="library" exported="" name="design-23.0.0" level="project" />
<orderEntry type="library" exported="" name="floatingactionbutton-1.3.0" level="project" />
<orderEntry type="library" exported="" name="robospice-1.4.14" level="project" />
<orderEntry type="library" exported="" name="commons-io-1.3.2" level="project" />
<orderEntry type="library" exported="" name="robospice-cache-1.4.14" level="project" />
<orderEntry type="library" exported="" name="robospice-1.4.14" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.0.0" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-23.0.0" level="project" />
<orderEntry type="library" exported="" name="library-1.2.3" level="project" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,12 @@ private void initActionbar(final Bundle savedInstanceState) {


if (savedInstanceState == null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
mShouldShowUp = mPickOptions.backBtnInMainActivity;
getSupportActionBar().setDisplayHomeAsUpEnabled(mPickOptions.backBtnInMainActivity);
getSupportActionBar().setTitle(R.string.albums_title);
} else {
mShouldShowUp = savedInstanceState.getBoolean(KEY_SHOULD_SHOW_ACTIONBAR_UP);
getSupportActionBar().setDisplayHomeAsUpEnabled(mShouldShowUp);
getSupportActionBar().setDisplayHomeAsUpEnabled(mShouldShowUp && mPickOptions.backBtnInMainActivity);
getSupportActionBar().setTitle(savedInstanceState.getString(KEY_ACTION_BAR_TITLE));


Expand Down Expand Up @@ -457,7 +458,7 @@ public void onBackPressed() {
//Return to albums fragment
getSupportFragmentManager().popBackStack();
getSupportActionBar().setTitle(R.string.albums_title);
mShouldShowUp = false;
mShouldShowUp = mPickOptions.backBtnInMainActivity;
getSupportActionBar().setDisplayHomeAsUpEnabled(mShouldShowUp);
hideSelectAll();
hideDeselectAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public final class Picker {
public final int doneFabIconTintColor;
public final boolean shouldShowCaptureMenuItem;
public final int checkIconTintColor;
public final boolean backBtnInMainActivity;


private Picker(final Builder builder) {
Expand All @@ -63,6 +64,7 @@ private Picker(final Builder builder) {
doneFabIconTintColor = builder.mDoneFabIconTintColor;
shouldShowCaptureMenuItem = builder.mShouldShowCaptureMenuItem;
checkIconTintColor = builder.mCheckIconTintColor;
backBtnInMainActivity = builder.mBackBtnInMainActivity;



Expand Down Expand Up @@ -112,6 +114,7 @@ public static class Builder {
private int mCaptureItemIconTintColor;
private boolean mShouldShowCaptureMenuItem;
private int mCheckIconTintColor;
private boolean mBackBtnInMainActivity;


//Use (Context,PickListener,themeResId) instead
Expand Down Expand Up @@ -252,6 +255,11 @@ public Picker.Builder setCheckIconTintColor(@ColorInt final int color) {
return this;
}

public Picker.Builder setBackBtnInMainActivity(final boolean backBtn) {
mBackBtnInMainActivity = backBtn;
return this;
}


public Picker build() {
return new Picker(this);
Expand Down

0 comments on commit 72f9c04

Please sign in to comment.