aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ActionBarActivity.java13
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java11
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;