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();
}
}
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();
}
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);
}
}
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);
}
}
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);
}
}
Aggregations