Search in sources :

Example 91 with ActionBar

use of androidx.appcompat.app.ActionBar in project PocketHub by pockethub.

the class CommitCompareViewActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.commit_compare);
    repository = getIntent().getParcelableExtra(EXTRA_REPOSITORY);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setSubtitle(InfoUtils.createRepoId(repository));
    fragment = getSupportFragmentManager().findFragmentById(R.id.list);
}
Also used : ActionBar(androidx.appcompat.app.ActionBar)

Example 92 with ActionBar

use of androidx.appcompat.app.ActionBar in project PocketHub by pockethub.

the class CreateCommentActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    repository = getIntent().getParcelableExtra(EXTRA_REPOSITORY);
    commit = getIntent().getStringExtra(EXTRA_BASE);
    position = getIntent().getIntExtra(EXTRA_POSITION, -1);
    path = getIntent().getStringExtra(EXTRA_PATH);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.pager_with_tabs);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setTitle(getString(R.string.commit_prefix) + CommitUtils.abbreviate(commit));
    actionBar.setSubtitle(InfoUtils.createRepoId(repository));
}
Also used : ActionBar(androidx.appcompat.app.ActionBar)

Example 93 with ActionBar

use of androidx.appcompat.app.ActionBar in project fresco by facebook.

the class ImageDetailsActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_drawee_transition_detail);
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
        actionBar.setDisplayHomeAsUpEnabled(true);
    }
    SimpleDraweeView simpleDraweeView = (SimpleDraweeView) findViewById(R.id.image);
    simpleDraweeView.setImageURI(getIntent().getData());
    ScalingUtils.ScaleType toScaleType = ScalingUtils.ScaleType.FOCUS_CROP;
    PointF toFocusPoint = new PointF(0.5f, 0);
    simpleDraweeView.getHierarchy().setActualImageScaleType(toScaleType);
    simpleDraweeView.getHierarchy().setActualImageFocusPoint(toFocusPoint);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        ScalingUtils.ScaleType fromScaleType = ScalingUtils.ScaleType.FOCUS_CROP;
        PointF fromFocusPoint = DraweeTransitionFragment.FOCUS_POINT;
        getWindow().setSharedElementEnterTransition(DraweeTransition.createTransitionSet(fromScaleType, toScaleType, fromFocusPoint, toFocusPoint));
        getWindow().setSharedElementReturnTransition(DraweeTransition.createTransitionSet(toScaleType, fromScaleType, toFocusPoint, fromFocusPoint));
    }
}
Also used : SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView) ScalingUtils(com.facebook.drawee.drawable.ScalingUtils) PointF(android.graphics.PointF) ActionBar(androidx.appcompat.app.ActionBar)

Example 94 with ActionBar

use of androidx.appcompat.app.ActionBar in project MovieGuide by esoxjem.

the class MovieDetailsFragment method setToolbar.

private void setToolbar() {
    collapsingToolbar.setContentScrimColor(ContextCompat.getColor(getContext(), R.color.colorPrimary));
    collapsingToolbar.setTitle(getString(R.string.movie_details));
    collapsingToolbar.setCollapsedTitleTextAppearance(R.style.CollapsedToolbar);
    collapsingToolbar.setExpandedTitleTextAppearance(R.style.ExpandedToolbar);
    collapsingToolbar.setTitleEnabled(true);
    if (toolbar != null) {
        ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
        ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
        if (actionBar != null) {
            actionBar.setDisplayHomeAsUpEnabled(true);
        }
    } else {
    // Don't inflate. Tablet is in landscape mode.
    }
}
Also used : AppCompatActivity(androidx.appcompat.app.AppCompatActivity) ActionBar(androidx.appcompat.app.ActionBar)

Example 95 with ActionBar

use of androidx.appcompat.app.ActionBar in project Timber by naman14.

the class FoldersFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_folders, container, false);
    Toolbar toolbar = (Toolbar) rootView.findViewById(R.id.toolbar);
    ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
    ActionBar ab = ((AppCompatActivity) getActivity()).getSupportActionBar();
    ab.setHomeAsUpIndicator(R.drawable.ic_menu);
    ab.setDisplayHomeAsUpEnabled(true);
    ab.setTitle(R.string.folders);
    recyclerView = (RecyclerView) rootView.findViewById(R.id.recyclerview);
    fastScroller = (FastScroller) rootView.findViewById(R.id.fastscroller);
    mProgressBar = (ProgressBar) rootView.findViewById(R.id.progressBar);
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    if (getActivity() != null)
        new loadFolders().execute("");
    return rootView;
}
Also used : AppCompatActivity(androidx.appcompat.app.AppCompatActivity) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) ActionBar(androidx.appcompat.app.ActionBar) Toolbar(androidx.appcompat.widget.Toolbar)

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