Search in sources :

Example 11 with ActionBar

use of android.support.v7.app.ActionBar in project NewPipe by TeamNewPipe.

the class DownloadActivity method onCreate.

@Override
@TargetApi(21)
protected void onCreate(Bundle savedInstanceState) {
    CrashHandler.init(this);
    CrashHandler.register();
    // Service
    Intent i = new Intent();
    i.setClass(this, DownloadManagerService.class);
    startService(i);
    super.onCreate(savedInstanceState);
    ThemeHelper.setTheme(this, true);
    setContentView(R.layout.activity_downloader);
    //noinspection ConstantConditions
    // its ok if this fails, we will catch that error later, and send it as report
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setTitle(R.string.downloads_title);
    actionBar.setDisplayShowTitleEnabled(true);
    mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
    // Fragment
    getWindow().getDecorView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {

        @Override
        public void onGlobalLayout() {
            updateFragments();
            getWindow().getDecorView().getViewTreeObserver().removeGlobalOnLayoutListener(this);
        }
    });
    // Intent
    if (getIntent().getAction() != null && getIntent().getAction().equals(INTENT_DOWNLOAD)) {
        mPendingUrl = getIntent().getData().toString();
    }
}
Also used : Intent(android.content.Intent) ViewTreeObserver(android.view.ViewTreeObserver) ActionBar(android.support.v7.app.ActionBar) TargetApi(android.annotation.TargetApi)

Example 12 with ActionBar

use of android.support.v7.app.ActionBar in project NewPipe by TeamNewPipe.

the class SettingsActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceBundle) {
    ThemeHelper.setTheme(this, true);
    getDelegate().installViewFactory();
    getDelegate().onCreate(savedInstanceBundle);
    super.onCreate(savedInstanceBundle);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setTitle(R.string.settings_title);
    actionBar.setDisplayShowTitleEnabled(true);
    getFragmentManager().beginTransaction().replace(android.R.id.content, f).commit();
}
Also used : ActionBar(android.support.v7.app.ActionBar)

Example 13 with ActionBar

use of android.support.v7.app.ActionBar in project SeriesGuide by UweTrottmann.

the class AmazonBillingActivity method setupActionBar.

@Override
protected void setupActionBar() {
    super.setupActionBar();
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
}
Also used : ActionBar(android.support.v7.app.ActionBar)

Example 14 with ActionBar

use of android.support.v7.app.ActionBar in project SeriesGuide by UweTrottmann.

the class CloudSetupActivity method setupActionBar.

@Override
protected void setupActionBar() {
    super.setupActionBar();
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
}
Also used : ActionBar(android.support.v7.app.ActionBar)

Example 15 with ActionBar

use of android.support.v7.app.ActionBar in project SeriesGuide by UweTrottmann.

the class DataLiberationActivity method setupActionBar.

@Override
protected void setupActionBar() {
    super.setupActionBar();
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
}
Also used : ActionBar(android.support.v7.app.ActionBar)

Aggregations

ActionBar (android.support.v7.app.ActionBar)400 View (android.view.View)117 Toolbar (android.support.v7.widget.Toolbar)98 TextView (android.widget.TextView)63 AppCompatActivity (android.support.v7.app.AppCompatActivity)31 ImageView (android.widget.ImageView)31 Intent (android.content.Intent)29 RecyclerView (android.support.v7.widget.RecyclerView)27 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)23 AdapterView (android.widget.AdapterView)21 ViewPager (android.support.v4.view.ViewPager)15 ArrayList (java.util.ArrayList)15 Bundle (android.os.Bundle)14 ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)14 SuppressLint (android.annotation.SuppressLint)13 ListView (android.widget.ListView)13 FragmentManager (android.app.FragmentManager)12 Fragment (android.support.v4.app.Fragment)12 ColorDrawable (android.graphics.drawable.ColorDrawable)10 NavigationView (android.support.design.widget.NavigationView)10