Search in sources :

Example 86 with ActionBar

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);
    }
}
Also used : ActionBarDrawerToggle(androidx.appcompat.app.ActionBarDrawerToggle) ActionBar(androidx.appcompat.app.ActionBar)

Example 87 with ActionBar

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);
}
Also used : SuppressLint(android.annotation.SuppressLint) ActionBar(androidx.appcompat.app.ActionBar) SuppressLint(android.annotation.SuppressLint)

Example 88 with ActionBar

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());
}
Also used : Bundle(android.os.Bundle) ActionBar(androidx.appcompat.app.ActionBar)

Example 89 with ActionBar

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));
}
Also used : ActionBar(androidx.appcompat.app.ActionBar)

Example 90 with ActionBar

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);
}
Also used : ActionBar(androidx.appcompat.app.ActionBar)

Aggregations

ActionBar (androidx.appcompat.app.ActionBar)139 View (android.view.View)30 Toolbar (androidx.appcompat.widget.Toolbar)29 AppCompatActivity (androidx.appcompat.app.AppCompatActivity)26 TextView (android.widget.TextView)18 Intent (android.content.Intent)11 Bundle (android.os.Bundle)11 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)8 SuppressLint (android.annotation.SuppressLint)7 AdapterView (android.widget.AdapterView)7 ImageView (android.widget.ImageView)7 Uri (android.net.Uri)6 DefaultItemDecoration (com.yanzhenjie.recyclerview.widget.DefaultItemDecoration)6 SharedPreferences (android.content.SharedPreferences)5 ListView (android.widget.ListView)5 Spinner (android.widget.Spinner)5 Typeface (com.mta.tehreer.graphics.Typeface)5 File (java.io.File)5 MenuItem (android.view.MenuItem)4 Button (android.widget.Button)4