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);
}
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));
}
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));
}
}
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.
}
}
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;
}
Aggregations