Search in sources :

Example 31 with ActionBar

use of androidx.appcompat.app.ActionBar in project SeriesGuide by UweTrottmann.

the class PeopleActivity method setupActionBar.

@Override
protected void setupActionBar() {
    super.setupActionBar();
    PeopleType peopleType = PeopleType.valueOf(getIntent().getStringExtra(InitBundle.PEOPLE_TYPE));
    setTitle(peopleType == PeopleType.CAST ? R.string.movie_cast : R.string.movie_crew);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setHomeAsUpIndicator(R.drawable.ic_clear_24dp);
        actionBar.setDisplayHomeAsUpEnabled(true);
        actionBar.setTitle(peopleType == PeopleType.CAST ? R.string.movie_cast : R.string.movie_crew);
    }
}
Also used : ActionBar(androidx.appcompat.app.ActionBar)

Example 32 with ActionBar

use of androidx.appcompat.app.ActionBar in project SeriesGuide by UweTrottmann.

the class MovieDetailsActivity method setupActionBar.

@Override
protected void setupActionBar() {
    super.setupActionBar();
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
        actionBar.setDisplayShowTitleEnabled(false);
    }
}
Also used : ActionBar(androidx.appcompat.app.ActionBar)

Example 33 with ActionBar

use of androidx.appcompat.app.ActionBar in project SeriesGuide by UweTrottmann.

the class BaseTopActivity method setupActionBar.

@Override
protected void setupActionBar() {
    super.setupActionBar();
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setHomeButtonEnabled(false);
    }
}
Also used : ActionBar(androidx.appcompat.app.ActionBar)

Example 34 with ActionBar

use of androidx.appcompat.app.ActionBar in project twicalico by moko256.

the class SearchResultActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ActionBar actionBar = Objects.requireNonNull(getSupportActionBar());
    actionBar.setTitle(getIntent().getStringExtra("query"));
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setHomeAsUpIndicator(R.drawable.ic_back_white_24dp);
    if (savedInstanceState == null) {
        SearchResultFragment fragment = new SearchResultFragment();
        fragment.setArguments(getIntent().getExtras());
        getSupportFragmentManager().beginTransaction().add(android.R.id.content, fragment).commit();
    }
}
Also used : ActionBar(androidx.appcompat.app.ActionBar)

Example 35 with ActionBar

use of androidx.appcompat.app.ActionBar in project K6nele by Kaljurand.

the class AboutActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AboutBinding binding = AboutBinding.inflate(getLayoutInflater());
    setContentView(binding.getRoot());
    ActionBar ab = getSupportActionBar();
    if (ab != null) {
        ab.setTitle(R.string.labelApp);
        ab.setSubtitle("v" + Utils.getVersionName(this));
    }
    binding.tvAbout.setMovementMethod(LinkMovementMethod.getInstance());
    String about = String.format(getString(R.string.tvAbout), getString(R.string.labelApp), PreferenceUtils.getUniqueId(PreferenceManager.getDefaultSharedPreferences(this)));
    binding.tvAbout.setText(Html.fromHtml(about));
}
Also used : AboutBinding(ee.ioc.phon.android.speak.databinding.AboutBinding) 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