当前位置: 首页>>代码示例>>Java>>正文


Java TitleLayout.setId方法代码示例

本文整理汇总了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;
	}
 
开发者ID:liupengandroid,项目名称:ywApplication,代码行数:28,代码来源:EditPage.java

示例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;
	}
 
开发者ID:zzlnewair,项目名称:Myshop,代码行数:28,代码来源:EditPage.java

示例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;
	}
 
开发者ID:BigAppOS,项目名称:BigApp_Discuz_Android,代码行数:35,代码来源:EditPage.java


注:本文中的cn.sharesdk.framework.TitleLayout.setId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。