use of androidx.appcompat.app.ActionBar in project EhViewer by seven332.
the class SettingsActivity method setActionBarUpIndicator.
private void setActionBarUpIndicator(Drawable drawable) {
ActionBarDrawerToggle.Delegate delegate = getDrawerToggleDelegate();
if (delegate != null) {
delegate.setActionBarUpIndicator(drawable, 0);
}
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeButtonEnabled(true);
}
}
use of androidx.appcompat.app.ActionBar in project EhViewer by seven332.
the class AppCompatPreferenceActivity method dispatchKeyEvent.
@SuppressLint("RestrictedApi")
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// Let support action bars open menus in response to the menu key prioritized over
// the window handling it
final int keyCode = event.getKeyCode();
final ActionBar actionBar = getSupportActionBar();
if (keyCode == KeyEvent.KEYCODE_MENU && actionBar != null && actionBar.onMenuKeyEvent(event)) {
return true;
}
return super.dispatchKeyEvent(event);
}
use of androidx.appcompat.app.ActionBar in project PocketHub by pockethub.
the class IssueSearchActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_issue_search);
ActionBar actionBar = getSupportActionBar();
Bundle appData = getIntent().getBundleExtra(APP_DATA);
if (appData != null) {
repository = appData.getParcelable(EXTRA_REPOSITORY);
if (repository != null) {
actionBar.setSubtitle(InfoUtils.createRepoId(repository));
actionBar.setDisplayHomeAsUpEnabled(true);
}
}
issueFragment = (SearchIssueListFragment) getSupportFragmentManager().findFragmentById(R.id.list);
handleIntent(getIntent());
}
use of androidx.appcompat.app.ActionBar in project PocketHub by pockethub.
the class EditCommentActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
comment = getIntent().getParcelableExtra(EXTRA_COMMENT);
issueNumber = getIntent().getIntExtra(EXTRA_ISSUE_NUMBER, -1);
repositoryId = getIntent().getParcelableExtra(Intents.EXTRA_REPOSITORY);
super.onCreate(savedInstanceState);
setContentView(R.layout.pager_with_tabs);
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(getString(R.string.issue_title) + issueNumber);
actionBar.setSubtitle(InfoUtils.createRepoId(repositoryId));
}
use of androidx.appcompat.app.ActionBar in project PocketHub by pockethub.
the class FiltersViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.issues_filter_list);
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(R.string.bookmarks);
actionBar.setDisplayHomeAsUpEnabled(true);
fragment = (FilterListFragment) getSupportFragmentManager().findFragmentById(R.id.list);
}
Aggregations