本文整理汇总了Java中com.aries.ui.view.title.TitleBarView类的典型用法代码示例。如果您正苦于以下问题:Java TitleBarView类的具体用法?Java TitleBarView怎么用?Java TitleBarView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TitleBarView类属于com.aries.ui.view.title包,在下文中一共展示了TitleBarView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initTitle
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
protected void initTitle() {
titleBar = (TitleBarView) findViewById(R.id.titleBar);
if (titleBar == null) {
return;
}
type = titleBar.getStatusBarModeType();
if (type <= 0) {//无法设置白底黑字
titleBar.setStatusAlpha(102);//5.0 半透明模式alpha-102
}
titleBar.setTitleMainText(mContext.getClass().getSimpleName());
setTitleBar();
titleBar.setOnLeftTextClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
setTitleLine(isShowLine());
}
示例2: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
titles = getResources().getStringArray(R.array.arrays_tab_news);
mPosition = getArguments().getInt("position");
titleBar.setTitleMainTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
if (mPosition == 3) {
titleBar.setTitleMainTextColor(Color.WHITE)
.setBackgroundResource(R.color.colorMainAli);
}
if (mPosition == 0 || mPosition == 2) {
View view = View.inflate(mContext, R.layout.layout_news_sliding, null);
mSlidingTab = view.findViewById(R.id.tabLayout_slidingNews);
titleBar.addCenterAction(titleBar.new ViewAction(view));
} else {
titleBar.setTitleMainText(titles[mPosition]);
}
titleBar.setLeftTextDrawable(mPosition == 0 || mPosition == 1 ? R.drawable.ic_news_search : 0)
.setLeftText(mPosition == 1 ? getString(R.string.find) : "")
.setRightTextDrawable(mPosition == 3 ? R.drawable.ic_news_setting_normal : mPosition == 0 ? R.drawable.ic_news_channel_plus : 0);
}
示例3: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
title = getIntent().getStringExtra("title");
titleBar.setStatusAlpha(102)
.setCenterGravityLeft(true)
.setCenterGravityLeftPadding(SizeUtil.dp2px(24))
.setTitleMainText(title)
.setTitleMainTextColor(Color.WHITE)
.setLeftTextDrawable(R.drawable.ic_back_white)
.setBackgroundColor(Color.parseColor("#38393E"));
}
示例4: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setLeftTextDrawable(R.drawable.ic_back_white)
.setTitleMainText("QQ默认主题TitleBar背景渐变")
.setTitleMainTextColor(Color.WHITE)
.setBackgroundResource(R.drawable.shape_qq_bg);
}
示例5: beforeSetTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void beforeSetTitleBar(TitleBarView titleBar) {
super.beforeSetTitleBar(titleBar);
titles = getResources().getStringArray(R.array.arrays_tab_ali);
titleBar.setStatusAlpha(75)
.setLeftTextColor(Color.WHITE)
.setRightTextColor(Color.WHITE)
.setLeftTextSize(TypedValue.COMPLEX_UNIT_DIP, 16)
.setRightTextSize(TypedValue.COMPLEX_UNIT_DIP, 16)
.setBackgroundResource(R.color.colorMainAli);
}
示例6: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setLeftText(titles[mPosition]);
if (mPosition == 3) {
titleBar.setRightText(R.string.setting);
}
}
示例7: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
isSliding = (boolean) SPUtil.get(mContext, SPConstant.SP_KEY_ACTIVITY_TAB_SLIDING, true);
if (isSliding && viewSliding == null) {
viewSliding = View.inflate(mContext, R.layout.layout_activity_sliding, null);
mSlidingTab = viewSliding.findViewById(R.id.tabLayout_slidingActivity);
} else if (!isSliding && viewSegment == null) {
viewSegment = View.inflate(mContext, R.layout.layout_activity_segment, null);
mSegmentTab = viewSegment.findViewById(R.id.tabLayout_segment);
}
LinearLayout center = titleBar.getLinearLayout(Gravity.CENTER);
if (isSliding) {
if (center.indexOfChild(viewSliding) == -1) {
titleBar.addCenterAction(titleBar.new ViewAction(viewSliding));
}
viewSliding.setVisibility(View.VISIBLE);
if (viewSegment != null) {
viewSegment.setVisibility(View.GONE);
}
} else {
if (center.indexOfChild(viewSegment) == -1) {
titleBar.addCenterAction(titleBar.new ViewAction(viewSegment));
}
viewSegment.setVisibility(View.VISIBLE);
if (viewSliding != null) {
viewSliding.setVisibility(View.GONE);
}
}
}
示例8: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
if (!mIsShowTitle) {
titleBar.setVisibility(View.GONE);
}
titleBar.setTitleMainTextMarquee(true)
.setDividerVisible(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP);
}
示例9: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setVisibility(View.GONE);
}
示例10: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setTitleMainText("ToastUtil工具类示例");
}
示例11: beforeSetTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void beforeSetTitleBar(TitleBarView titleBar) {
mPosition = getArguments().getInt("position");
super.beforeSetTitleBar(titleBar);
}
示例12: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setTitleMainText("Activity直接嵌套Fragment懒加载效果")
.setTitleMainTextSize(TypedValue.COMPLEX_UNIT_DIP,16)
.setTitleMainTextMarquee(true);
}
示例13: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setTitleMainText(R.string.third_part);
}
示例14: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setTitleMainText(R.string.setting);
}
示例15: setTitleBar
import com.aries.ui.view.title.TitleBarView; //导入依赖的package包/类
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setTitleMainText(R.string.mine);
}