本文整理汇总了Java中cn.sharesdk.framework.TitleLayout.setLayoutParams方法的典型用法代码示例。如果您正苦于以下问题:Java TitleLayout.setLayoutParams方法的具体用法?Java TitleLayout.setLayoutParams怎么用?Java TitleLayout.setLayoutParams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cn.sharesdk.framework.TitleLayout
的用法示例。
在下文中一共展示了TitleLayout.setLayoutParams方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例4: onCreate
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// 标题栏
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
FrameLayout flPage = new FrameLayout(getContext());
LayoutParams lpFl = new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
// 关注(或朋友)列表
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// 请求数据
followList.performPulling(true);
}
示例5: onCreate
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// 标题栏
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
FrameLayout flPage = new FrameLayout(getContext());
LinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
// 关注(或朋友)列表
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// 请求数据
followList.performPulling(true);
}
示例6: onCreate
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// 标题栏
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "ssdk_oks_title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "ssdk_oks_multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "ssdk_oks_finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
FrameLayout flPage = new FrameLayout(getContext());
LinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
// 关注(或朋友)列表
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "ssdk_oks_title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// 请求数据
followList.performPulling(true);
}
示例7: onCreate
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// 标题栏
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "ssdk_oks_title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "ssdk_oks_multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "ssdk_oks_finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
FrameLayout flPage = new FrameLayout(getContext());
LayoutParams lpFl = new LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
// 关注(或朋友)列表
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "ssdk_oks_title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// 请求数据
followList.performPulling(true);
}
示例8: onCreate
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// 标题栏
llTitle = new TitleLayout(getContext());
llTitle.setBackgroundResource(R.drawable.title_back);
llTitle.getBtnBack().setOnClickListener(this);
llTitle.getTvTitle().setText(R.string.multi_share);
llTitle.getBtnRight().setVisibility(View.VISIBLE);
llTitle.getBtnRight().setText(R.string.finish);
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
FrameLayout flPage = new FrameLayout(getContext());
LinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
// body-list
ListView followList = new ListView(getContext());
followList.setCacheColorHint(0);
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(getContext());
adapter.setPlatform(platform);
followList.setAdapter(adapter);
followList.setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
ivShadow.setBackgroundResource(R.drawable.title_shadow);
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
}
示例9: onCreate
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// title bar
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
FrameLayout flPage = new FrameLayout(getContext());
LinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
// the list of friends or followings
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// request data
followList.performPulling(true);
}
示例10: onCreate
import cn.sharesdk.framework.TitleLayout; //导入方法依赖的package包/类
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
//#if def{lang} == cn
// 标题栏
//#endif
llTitle = new TitleLayout(getContext());
int resId = cn.sharesdk.framework.utils.R.getBitmapRes(activity, "title_back");
llTitle.setBackgroundResource(resId);
llTitle.getBtnBack().setOnClickListener(this);
resId = cn.sharesdk.framework.utils.R.getStringRes(activity, "multi_share");
llTitle.getTvTitle().setText(resId);
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = cn.sharesdk.framework.utils.R.getStringRes(activity, "finish");
llTitle.getBtnRight().setText(resId);
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
FrameLayout flPage = new FrameLayout(getContext());
LinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
//#if def{lang} == cn
// 关注(或朋友)列表
//#endif
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = cn.sharesdk.framework.utils.R.getBitmapRes(activity, "title_shadow");
ivShadow.setBackgroundResource(resId);
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
//#if def{lang} == cn
// 请求数据
//#endif
followList.performPulling(true);
}