do not provide up navigation in publish account when in setup mode
This commit is contained in:
parent
f9cafc144b
commit
185d36d270
|
@ -5,9 +5,13 @@ import android.support.v7.app.AppCompatActivity;
|
|||
|
||||
public abstract class ActionBarActivity extends AppCompatActivity {
|
||||
public static void configureActionBar(ActionBar actionBar) {
|
||||
configureActionBar(actionBar, true);
|
||||
}
|
||||
|
||||
public static void configureActionBar(ActionBar actionBar, boolean upNavigation) {
|
||||
if (actionBar != null) {
|
||||
actionBar.setHomeButtonEnabled(true);
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setHomeButtonEnabled(upNavigation);
|
||||
actionBar.setDisplayHomeAsUpEnabled(upNavigation);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -77,7 +77,6 @@ public class PublishProfilePictureActivity extends XmppActivity implements XmppC
|
|||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_publish_profile_picture);
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
configureActionBar(getSupportActionBar());
|
||||
|
||||
this.avatar = findViewById(R.id.account_image);
|
||||
this.cancelButton = findViewById(R.id.cancel_button);
|
||||
|
@ -158,12 +157,13 @@ public class PublishProfilePictureActivity extends XmppActivity implements XmppC
|
|||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
if (getIntent() != null) {
|
||||
this.mInitialAccountSetup = getIntent().getBooleanExtra("setup", false);
|
||||
}
|
||||
final Intent intent = getIntent();
|
||||
this.mInitialAccountSetup = intent != null && intent.getBooleanExtra("setup", false);
|
||||
|
||||
if (this.mInitialAccountSetup) {
|
||||
this.cancelButton.setText(R.string.skip);
|
||||
}
|
||||
configureActionBar(getSupportActionBar(), !this.mInitialAccountSetup);
|
||||
}
|
||||
|
||||
protected void loadImageIntoPreview(Uri uri) {
|
||||
|
|
Loading…
Reference in a new issue