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 abstract class ActionBarActivity extends AppCompatActivity {
|
||||||
public static void configureActionBar(ActionBar actionBar) {
|
public static void configureActionBar(ActionBar actionBar) {
|
||||||
|
configureActionBar(actionBar, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void configureActionBar(ActionBar actionBar, boolean upNavigation) {
|
||||||
if (actionBar != null) {
|
if (actionBar != null) {
|
||||||
actionBar.setHomeButtonEnabled(true);
|
actionBar.setHomeButtonEnabled(upNavigation);
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(upNavigation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -77,7 +77,6 @@ public class PublishProfilePictureActivity extends XmppActivity implements XmppC
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_publish_profile_picture);
|
setContentView(R.layout.activity_publish_profile_picture);
|
||||||
setSupportActionBar(findViewById(R.id.toolbar));
|
setSupportActionBar(findViewById(R.id.toolbar));
|
||||||
configureActionBar(getSupportActionBar());
|
|
||||||
|
|
||||||
this.avatar = findViewById(R.id.account_image);
|
this.avatar = findViewById(R.id.account_image);
|
||||||
this.cancelButton = findViewById(R.id.cancel_button);
|
this.cancelButton = findViewById(R.id.cancel_button);
|
||||||
|
@ -158,12 +157,13 @@ public class PublishProfilePictureActivity extends XmppActivity implements XmppC
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
if (getIntent() != null) {
|
final Intent intent = getIntent();
|
||||||
this.mInitialAccountSetup = getIntent().getBooleanExtra("setup", false);
|
this.mInitialAccountSetup = intent != null && intent.getBooleanExtra("setup", false);
|
||||||
}
|
|
||||||
if (this.mInitialAccountSetup) {
|
if (this.mInitialAccountSetup) {
|
||||||
this.cancelButton.setText(R.string.skip);
|
this.cancelButton.setText(R.string.skip);
|
||||||
}
|
}
|
||||||
|
configureActionBar(getSupportActionBar(), !this.mInitialAccountSetup);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void loadImageIntoPreview(Uri uri) {
|
protected void loadImageIntoPreview(Uri uri) {
|
||||||
|
|
Loading…
Reference in New Issue