本文整理汇总了Java中cn.sharesdk.framework.TitleLayout.setId方法的典型用法代码示例。如果您正苦于以下问题:Java TitleLayout.setId方法的具体用法?Java TitleLayout.setId怎么用?Java TitleLayout.setId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cn.sharesdk.framework.TitleLayout
的用法示例。
在下文中一共展示了TitleLayout.setId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPageTitle
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
private TitleLayout getPageTitle() {
llTitle = new TitleLayout(getContext());
llTitle.setId(1);
// int resId = getBitmapRes(activity, "title_back");
// if (resId > 0) {
// llTitle.setBackgroundResource(resId);
// }
llTitle.getBtnBack().setOnClickListener(this);
int resId = getStringRes(activity, "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(activity, "share");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lp.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
lp.addRule(RelativeLayout.ALIGN_PARENT_TOP);
lp.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
llTitle.setLayoutParams(lp);
return llTitle;
}
示例2: getPageTitle
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
private TitleLayout getPageTitle() {
llTitle = new TitleLayout(getContext());
llTitle.setId(1);
// int resId = getBitmapRes(activity, "title_back");
// if (resId > 0) {
// llTitle.setBackgroundResource(resId);
// }
llTitle.getBtnBack().setOnClickListener(this);
int resId = getStringRes(activity, "ssdk_oks_multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(activity, "ssdk_oks_share");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lp.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
lp.addRule(RelativeLayout.ALIGN_PARENT_TOP);
lp.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
llTitle.setLayoutParams(lp);
return llTitle;
}
示例3: getPageTitle
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
private TitleLayout getPageTitle() {
llTitle = new TitleLayout(getContext());
llTitle.setId(1);
// int resId = getBitmapRes(activity, "title_back");
// if (resId > 0) {
// llTitle.setBackgroundResource(resId);
// }
int resIdBackgroundColor = getColorRes(activity, "bg_title");
if (resIdBackgroundColor > 0) {
llTitle.setBackgroundColor(activity.getResources().getColor(resIdBackgroundColor));
Log.d("resIdBackgroundColor","resIdBackgroundColor:"+resIdBackgroundColor);
}
llTitle.getBtnBack().setOnClickListener(this);
int resId = getStringRes(activity, "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(activity, "share");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lp.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
lp.addRule(RelativeLayout.ALIGN_PARENT_TOP);
lp.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
llTitle.setLayoutParams(lp);
return llTitle;
}