aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/ActionBarActivity.java
blob: 06dad3d13ffee42982a1e1bcb26a4720aacac93e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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) {
        configureActionBar(actionBar, true);
    }

    public static void configureActionBar(ActionBar actionBar, boolean upNavigation) {
        if (actionBar != null) {
            actionBar.setHomeButtonEnabled(upNavigation);
            actionBar.setDisplayHomeAsUpEnabled(upNavigation);
        }
    }
}