运单详情,货源详情,我的页面页面迁移
This commit is contained in:
@@ -173,6 +173,27 @@ public abstract class BaseActivity<VB extends ViewBinding> extends AppCompatActi
|
||||
((TextView) findViewById(R.id.common_toolBar_title)).setText(title);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置标题以及主题颜色
|
||||
*/
|
||||
protected void setTitleBar(String title, boolean isWhite, boolean isBack) {
|
||||
mToolbar = (Toolbar) findViewById(R.id.common_toolbar);
|
||||
mToolbar.setBackgroundColor(statusColor == -1 ? Color.TRANSPARENT : ContextCompat.getColor(mContext, statusColor));
|
||||
|
||||
if (isBack) {
|
||||
mToolbar.setNavigationIcon(isWhite ? R.drawable.left : R.drawable.left_black);
|
||||
mToolbar.setNavigationOnClickListener(view -> finish());
|
||||
}
|
||||
if (!TextUtils.isEmpty(title)) {//
|
||||
((TextView) findViewById(R.id.common_toolBar_title)).setTextColor(isWhite ? getColor(R.color.colorWhite) : getColor(R.color.black));
|
||||
((TextView) findViewById(R.id.common_toolBar_title)).setText(title);
|
||||
}
|
||||
if (isWhite) {
|
||||
StatusBar.cancelLightStatusBar(this);//图标文字白色
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示右边标题
|
||||
@@ -202,10 +223,13 @@ public abstract class BaseActivity<VB extends ViewBinding> extends AppCompatActi
|
||||
* 设置距离顶部距离
|
||||
*/
|
||||
protected void setStatusHeightParams(View llContent) {
|
||||
RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
closeLayoutParams.topMargin = ConvertUtils.dp2px(8) + BarUtils.getStatusBarHeight();
|
||||
// closeLayoutParams.topMargin = BarUtils.getStatusBarHeight();
|
||||
llContent.setLayoutParams(closeLayoutParams);
|
||||
// RelativeLayout.LayoutParams closeLayoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
// closeLayoutParams.topMargin = ConvertUtils.dp2px(8) + BarUtils.getStatusBarHeight();
|
||||
//// closeLayoutParams.topMargin = BarUtils.getStatusBarHeight();
|
||||
// llContent.setLayoutParams(closeLayoutParams);
|
||||
|
||||
|
||||
llContent.setPadding(0, BarUtils.getStatusBarHeight(), 0, 0);
|
||||
}
|
||||
|
||||
protected abstract void initView(Bundle savedInstanceState);
|
||||
|
||||
Reference in New Issue
Block a user