From 1046acb3e192c940dc99ebb564ec2756493ec987 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Wed, 11 Apr 2018 21:43:38 +0200 Subject: replace deprecated action bar with toolbar * replace deprecated action bar with toolbar * add toolbar support in each activity * remove redundant themes made earlier * add configure action bar method in xmpp activity * remove android namespace from actionmodeoverlay * solve bug of scrolling toolbar --- src/main/java/de/pixart/messenger/ui/XmppActivity.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/de/pixart/messenger/ui/XmppActivity.java') diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 48ddf8fdf..112c01cee 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -421,10 +421,6 @@ public abstract class XmppActivity extends AppCompatActivity { setTheme(this.mTheme); this.mUsingEnterKey = usingEnterKey(); mUseSubject = getPreferences().getBoolean("use_subject", getResources().getBoolean(R.bool.use_subject)); - final ActionBar ab = getSupportActionBar(); - if (ab != null) { - ab.setDisplayHomeAsUpEnabled(true); - } } protected boolean isCameraFeatureAvailable() { @@ -609,6 +605,13 @@ public abstract class XmppActivity extends AppCompatActivity { } } + public static void configureActionBar(ActionBar actionBar) { + if (actionBar != null) { + actionBar.setHomeButtonEnabled(true); + actionBar.setDisplayHomeAsUpEnabled(true); + } + } + protected boolean noAccountUsesPgp() { if (!hasPgp()) { return true; -- cgit v1.2.3