本文整理匯總了Java中com.aries.ui.view.title.TitleBarView.setTitleMainText方法的典型用法代碼示例。如果您正苦於以下問題:Java TitleBarView.setTitleMainText方法的具體用法?Java TitleBarView.setTitleMainText怎麽用?Java TitleBarView.setTitleMainText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.aries.ui.view.title.TitleBarView
的用法示例。
在下文中一共展示了TitleBarView.setTitleMainText方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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) {
titleBar.setTitleMainText("ToastUtil工具類示例");
}
示例4: setTitleBar
import com.aries.ui.view.title.TitleBarView; //導入方法依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setTitleMainText(R.string.third_part);
}
示例5: setTitleBar
import com.aries.ui.view.title.TitleBarView; //導入方法依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setTitleMainText(R.string.setting);
}
示例6: setTitleBar
import com.aries.ui.view.title.TitleBarView; //導入方法依賴的package包/類
@Override
public void setTitleBar(TitleBarView titleBar) {
titleBar.setTitleMainText(R.string.mine);
}