Search in sources :

Example 51 with ActionBar

use of androidx.appcompat.app.ActionBar in project Taskbar by farmerbb.

the class AboutFragment method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    AppCompatActivity activity = (AppCompatActivity) getActivity();
    activity.setTitle(((MainActivity) getActivity()).getAboutFragmentTitle());
    ActionBar actionBar = activity.getSupportActionBar();
    if (actionBar != null)
        actionBar.setDisplayHomeAsUpEnabled(((MainActivity) getActivity()).getAboutFragmentBackArrow());
}
Also used : AppCompatActivity(androidx.appcompat.app.AppCompatActivity) MainActivity(com.farmerbb.taskbar.activity.MainActivity) ActionBar(androidx.appcompat.app.ActionBar)

Example 52 with ActionBar

use of androidx.appcompat.app.ActionBar in project Taskbar by farmerbb.

the class DesktopModeFragment method onActivityCreated.

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    AppCompatActivity activity = (AppCompatActivity) getActivity();
    activity.setTitle(R.string.tb_pref_header_desktop_mode);
    ActionBar actionBar = activity.getSupportActionBar();
    if (actionBar != null)
        actionBar.setDisplayHomeAsUpEnabled(true);
}
Also used : AppCompatActivity(androidx.appcompat.app.AppCompatActivity) ActionBar(androidx.appcompat.app.ActionBar)

Example 53 with ActionBar

use of androidx.appcompat.app.ActionBar in project prebid-mobile-android by prebid.

the class InfoActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_info);
    mWebView = findViewById(R.id.web_view);
    Bundle extras = getIntent().getExtras();
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
    if (extras != null && extras.containsKey(EXTRA_TITLE) && extras.containsKey(EXTRA_HTML_CONTENT)) {
        setupUI(extras.getString(EXTRA_TITLE), extras.getString(EXTRA_HTML_CONTENT));
    } else {
        finish();
    }
}
Also used : Bundle(android.os.Bundle) ActionBar(androidx.appcompat.app.ActionBar)

Example 54 with ActionBar

use of androidx.appcompat.app.ActionBar in project LabDayApp by jakdor.

the class TimetableFragment method onResume.

@Override
public void onResume() {
    super.onResume();
    if (testMode)
        return;
    if (getActivity() != null) {
        ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
        if (actionBar != null) {
            actionBar.show();
            actionBar.setTitle(R.string.menu_title_timetable);
        }
    }
}
Also used : AppCompatActivity(androidx.appcompat.app.AppCompatActivity) ActionBar(androidx.appcompat.app.ActionBar)

Example 55 with ActionBar

use of androidx.appcompat.app.ActionBar in project nextcloud-notes by stefan-niedermann.

the class AppendToNoteActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    receivedText = ShareUtil.extractSharedText(getIntent());
    @Nullable final ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        getSupportActionBar().setTitle(R.string.append_to_note);
    } else {
        Log.e(TAG, "SupportActionBar is null. Expected toolbar to be present to set a title.");
    }
    binding.activityNotesListView.searchToolbar.setSubtitle(receivedText);
}
Also used : Nullable(androidx.annotation.Nullable) 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