diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:14:47 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:14:47 +0200 |
commit | f5809e56c6c7bf78b6af7273ee3abf3e676bacb2 (patch) | |
tree | cc2d078bcdafebcf0c87a6542c9e0eaacee2c9b1 /src/main/java/de/pixart | |
parent | a1f97130317d1bd41c9be2559dbef215c0633fe7 (diff) |
some location rework
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ActionBarActivity.java | 13 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 11 |
2 files changed, 14 insertions, 10 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java b/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java new file mode 100644 index 000000000..997edaac3 --- /dev/null +++ b/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java @@ -0,0 +1,13 @@ +package de.pixart.messenger.ui; + +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; + +public abstract class ActionBarActivity extends AppCompatActivity { + public static void configureActionBar(ActionBar actionBar) { + if (actionBar != null) { + actionBar.setHomeButtonEnabled(true); + actionBar.setDisplayHomeAsUpEnabled(true); + } + } +} diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 613d18792..0b425c0d8 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -36,9 +36,7 @@ import android.os.SystemClock; import android.preference.PreferenceManager; import android.provider.Settings; import android.support.v4.content.ContextCompat; -import android.support.v7.app.ActionBar; import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatDelegate; import android.text.InputType; import android.util.DisplayMetrics; @@ -85,7 +83,7 @@ import de.pixart.messenger.xmpp.OnKeyStatusUpdated; import de.pixart.messenger.xmpp.OnUpdateBlocklist; import rocks.xmpp.addr.Jid; -public abstract class XmppActivity extends AppCompatActivity { +public abstract class XmppActivity extends ActionBarActivity { protected static final int REQUEST_ANNOUNCE_PGP = 0x0101; protected static final int REQUEST_INVITE_TO_CONVERSATION = 0x0102; @@ -611,13 +609,6 @@ 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; |