use of androidx.appcompat.app.ActionBar in project WordPress-Login-Flow-Android by wordpress-mobile.
the class LoginMagicLinkRequestFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Toolbar toolbar = view.findViewById(R.id.toolbar);
((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
if (actionBar != null) {
actionBar.setTitle(R.string.log_in);
actionBar.setDisplayHomeAsUpEnabled(true);
}
if (savedInstanceState == null) {
mAnalyticsListener.trackMagicLinkRequestFormViewed();
}
if (mForceRequestAtStart && !mInProgress) {
dispatchMagicLinkRequest();
}
}
use of androidx.appcompat.app.ActionBar in project WordPress-Login-Flow-Android by wordpress-mobile.
the class LoginMagicLinkSentFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Toolbar toolbar = view.findViewById(R.id.toolbar);
((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);
ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
if (actionBar != null) {
actionBar.setTitle(R.string.log_in);
actionBar.setDisplayHomeAsUpEnabled(true);
}
if (savedInstanceState == null) {
mAnalyticsListener.trackLoginMagicLinkOpenEmailClientViewed();
}
}
use of androidx.appcompat.app.ActionBar in project CloudReader by youlookwhat.
the class BaseActivity method setToolBar.
/**
* 设置titlebar
*/
protected void setToolBar(Toolbar toolbar) {
setSupportActionBar(toolbar);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
// 去除默认Title显示
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeAsUpIndicator(R.drawable.icon_back);
}
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
supportFinishAfterTransition();
}
});
}
use of androidx.appcompat.app.ActionBar in project CloudReader by youlookwhat.
the class ToolbarHelper method initFullBar.
/**
* 将Toolbar高度填充到状态栏
*/
public static void initFullBar(Toolbar toolbar, AppCompatActivity activity) {
ViewGroup.LayoutParams params = toolbar.getLayoutParams();
params.height = DensityUtil.getStatusHeight(activity) + getSystemActionBarSize(activity);
toolbar.setLayoutParams(params);
toolbar.setPadding(toolbar.getLeft(), toolbar.getTop() + DensityUtil.getStatusHeight(activity), toolbar.getRight(), toolbar.getBottom());
activity.setSupportActionBar(toolbar);
ActionBar actionBar = activity.getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeButtonEnabled(true);
}
use of androidx.appcompat.app.ActionBar in project CloudReader by youlookwhat.
the class MainActivity method initView.
private void initView() {
setNoTitle();
setSupportActionBar(bindingView.include.toolbar);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
// 去除默认Title显示
actionBar.setDisplayShowTitleEnabled(false);
}
vpContent = bindingView.include.vpContent;
ivTitleOne = bindingView.include.ivTitleOne;
ivTitleTwo = bindingView.include.ivTitleTwo;
ivTitleThree = bindingView.include.ivTitleThree;
bindingView.include.llTitleMenu.setOnClickListener(this);
bindingView.include.ivTitleOne.setOnClickListener(this);
bindingView.include.ivTitleTwo.setOnClickListener(this);
bindingView.include.ivTitleThree.setOnClickListener(this);
getClipContent();
UpdateUtil.check(this, false);
}
Aggregations