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


Java ResHelper.getLayoutRes方法代码示例

本文整理汇总了Java中com.mob.tools.utils.ResHelper.getLayoutRes方法的典型用法代码示例。如果您正苦于以下问题:Java ResHelper.getLayoutRes方法的具体用法?Java ResHelper.getLayoutRes怎么用?Java ResHelper.getLayoutRes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.mob.tools.utils.ResHelper的用法示例。


在下文中一共展示了ResHelper.getLayoutRes方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildReplyEditorPopWindow

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
public ReplyEditorPopWindow buildReplyEditorPopWindow(Context context
		, ReplyEditorPopWindow.OnConfirmClickListener listener
		, ReplyEditorPopWindow.OnImgAddClickListener clicklistener) {
	return new ReplyEditorPopWindow(context, listener, clicklistener) {
		@Override
		protected View getContentView() {
			return LayoutInflater.from(getContext()).inflate(ResHelper.getLayoutRes(getContext(), "bbs_theme1_reply_editor"), null);
		}
		@Override
		protected Integer getAddPicImageId() {
			return ResHelper.getBitmapRes(getContext(), "bbs_theme1_reply_addpic");
		}
		@Override
		protected Integer getReplyAddPicLayoutId() {
			return ResHelper.getLayoutRes(getContext(), "bbs_theme1_reply_addpic");
		}
	};
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:20,代码来源:BBSTheme1ViewBuilder.java

示例2: getContentView

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
protected View getContentView(final int position, View convertView, ViewGroup parent) {
	Integer layout = ResHelper.getLayoutRes(getContext(), "bbs_theme1_item_searchthread");
	Object obj = getItem(position);
	if(obj instanceof ForumThread) {
		final ForumThread forumthread = (ForumThread) obj;
		final View view = ListViewItemBuilder.getInstance().buildLayoutThreadView(forumthread, convertView, parent, layout);
		TextView textViewTime = (TextView) view.findViewById(ResHelper.getIdRes(getContext(), "textViewMainViewThreadTime"));
		if (textViewTime != null) {
			textViewTime.setText(com.mob.bbssdk.gui.utils.TimeUtils.timeDiff(getContext(), forumthread.createdOn));
		}
		TextView textViewPageLike = (TextView) view.findViewById(ResHelper.getIdRes(getContext(), "textViewPageLike"));
		if(textViewPageLike != null) {
			textViewPageLike.setText("" + forumthread.recommendadd);
		}
		ListViewItemBuilder.getInstance().setThreadViewClickListener(forumthread, view);
		return view;
	}
	return null;
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:21,代码来源:Theme1SearchPullToRequestView.java

示例3: getContentView

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
protected View getContentView(int position, View convertView, ViewGroup parent) {
	Integer layout = ResHelper.getLayoutRes(getContext(), "bbs_theme1_item_otheruserprofile");
	View view = ListViewItemBuilder.getInstance().buildLayoutThreadView(getItem(position), convertView, parent, layout);
	TextView textViewPageLike = (TextView) view.findViewById(ResHelper.getIdRes(getContext(), "textViewPageLike"));
	textViewPageLike.setText("" + getItem(position).recommendadd);
	view.findViewById(ResHelper.getIdRes(getContext(), "bbs_item_forumpost_textViewSubject")).setVisibility(GONE);
	final ForumThread thread = getItem(position);
	view.setOnClickListener(new View.OnClickListener() {
		@Override
		public void onClick(View v) {
			if (thread != null) {
				PageForumThreadDetail pageForumThreadDetail = BBSViewBuilder.getInstance().buildPageForumThreadDetail();
				pageForumThreadDetail.setForumThread(thread);
				pageForumThreadDetail.show(getContext());
			}
		}
	});
	return view;
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:21,代码来源:Theme1OtherUserProfilePullRequestView.java

示例4: getContentView

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
protected View getContentView(int position, View convertView, ViewGroup parent) {
	Integer layout = ResHelper.getLayoutRes(getContext(), "bbs_theme1_item_forumthread");
	final ForumThread forumthread = getItem(position);
	final View view = ListViewItemBuilder.getInstance().buildLayoutThreadView(forumthread, convertView, parent, layout);
	TextView subjectName = (TextView) view.findViewById(ResHelper.getIdRes(getContext(), "bbs_item_forumpost_textViewSubject"));
	subjectName.setVisibility(GONE);
	if(null == forumthread) {
		return view;
	}
	TextView textViewTime = (TextView) view.findViewById(ResHelper.getIdRes(getContext(), "textViewMainViewThreadTime"));
	if (textViewTime != null) {
		textViewTime.setText(com.mob.bbssdk.gui.utils.TimeUtils.timeDiff(getContext(), forumthread.createdOn));
	}
	TextView textViewPageLike = (TextView) view.findViewById(ResHelper.getIdRes(getContext(), "textViewPageLike"));
	if (textViewPageLike != null) {
		textViewPageLike.setText("" + forumthread.recommendadd);
	}
	ListViewItemBuilder.getInstance().setThreadViewClickListener(forumthread, view);
	return view;
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:22,代码来源:Theme1ForumThreadPullToRequestView.java

示例5: updateTabFunc

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
protected void updateTabFunc() {
	//view created and data got.
	if (viewHeaderContent != null && forumForum != null) {
		layoutScrollView.removeAllViews();
		for(final ForumForum forum : forumForum) {
			Integer layout = ResHelper.getLayoutRes(getContext(), "bbs_theme1_mainviewheader_funcitem");
			View view = layoutInflater.inflate(layout, layoutScrollView, false);
			ImageView imageViewHeaderFunc = (ImageView) view.findViewById(ResHelper.getIdRes(getContext(), "imageViewHeaderFunc"));
			TextView textViewHeaderFunc = (TextView) view.findViewById(ResHelper.getIdRes(getContext(), "textViewHeaderFunc"));
			textViewHeaderFunc.setText(forum.name);
			if(forum.fid == 0 && StringUtils.isEmpty(forum.forumPic)) {
				imageViewHeaderFunc.setImageResource(defaultTotalForumPic);
			} else {
				ImageDownloader.loadCircleImage(forum.forumPic, imageViewHeaderFunc);
			}
			view.setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					if (forum != null) {
						Theme1PageForumThread page = new Theme1PageForumThread();
						page.initData(forum);
						page.show(getContext());
					}
				}
			});
			layoutScrollView.addView(view);
		}
	}
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:30,代码来源:Theme1MainView.java

示例6: getMainActivityLayout

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public Integer getMainActivityLayout(Context context) {
	return ResHelper.getLayoutRes(context, "bbs_theme0_activity_main");
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:4,代码来源:BBSTheme0ViewBuilder.java

示例7: getThreadItemLayoutId

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
protected Integer getThreadItemLayoutId(Context context) {
	return ResHelper.getLayoutRes(context, "bbs_theme0_item_forumthread");
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:5,代码来源:Theme0ListViewItemBuilder.java

示例8: getFavoriteItemLayoutId

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
protected Integer getFavoriteItemLayoutId(Context context) {
	return ResHelper.getLayoutRes(context, "bbs_theme0_item_favorite");
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:5,代码来源:Theme0ListViewItemBuilder.java

示例9: getMainActivityLayout

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
public Integer getMainActivityLayout(Context context) {
	return ResHelper.getLayoutRes(context, "bbs_theme1_activity_main");
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:5,代码来源:BBSTheme1ViewBuilder.java

示例10: onCreateContentView

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
protected View onCreateContentView(Context context) {
	Integer layoutid = ResHelper.getLayoutRes(getContext(), "bbs_theme1_forumthread");
	View view = LayoutInflater.from(getContext()).inflate(layoutid, null, false);
	return view;
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:7,代码来源:Theme1PageForumThread.java

示例11: onCreateContentView

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
protected View onCreateContentView(Context context) {
	Integer layoutid = ResHelper.getLayoutRes(getContext(), "bbs_theme1_userprofile");
	View view = LayoutInflater.from(getContext()).inflate(layoutid, null, false);
	return view;
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:7,代码来源:Theme1PageUserProfile.java

示例12: getLayoutId

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public Integer getLayoutId(String name) {
	return ResHelper.getLayoutRes(getContext(), name);
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:4,代码来源:BaseView.java

示例13: onCreate

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	//通过AndroidManifest.xml设置主题,防止启动时有黑色背景框的效果。
	//setTheme(ResHelper.getStyleRes(this, "BBS_AppTheme"));
	Window window = getWindow();
	//21以下通过主题配置statusbar颜色
	if (Build.VERSION.SDK_INT >= 21) {
		window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
				| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
		window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
				| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
				| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
		window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
		Integer color = getStatusBarColor();
		if(color == null) {
			color = getResources().getColor(ResHelper.getColorRes(this, "bbs_mainviewtitle_bg"));
		}
		window.setStatusBarColor(color);
	}
	Integer layout = getMainLayout();
	if(layout == null) {
		layout = ResHelper.getLayoutRes(this, "bbs_activity_main");
	}
	setContentView(layout);
	boolean allpermissiongranted = false;
	allpermissiongranted = checkPermissions();
	mainView = (MainViewInterface) findViewById(ResHelper.getIdRes(this, "mainView"));

	mainView.setThreadItemClickListener(new ForumThreadListView.OnItemClickListener() {
		public void onItemClick(int position, ForumThread item) {
			if (item != null) {
				showDetailsView(item);
			}
		}
	});
	mainView.setForumItemClickListener(new MainView.ForumItemClickListener() {
		public void onItemClick(ForumForum forum) {
			if (forum != null) {
				showForumThreadView(forum);
			}
		}
	});
	//加载数据
	if (mainView != null) {
		mainView.onCreate();
	}
	//If all permissions have been granted then load the data, otherwise load data in onRequestPermissionsResult();
	if(allpermissiongranted) {
		mainView.loadData();
	}
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:52,代码来源:BaseMainActivity.java

示例14: buildLayoutFavoriteView

import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public View buildLayoutFavoriteView(FavoriteThread fthread, View convertview, ViewGroup viewgroup, Integer layoutid) {
	Context context = viewgroup.getContext();
	FavoriteViewHolder viewholder;
	if (convertview == null || convertview.getTag() == null || !(convertview.getTag() instanceof FavoriteViewHolder)) {
		if(layoutid == null) {
			layoutid = getFavoriteItemLayoutId(context);
			if (layoutid == null) {
				layoutid = ResHelper.getLayoutRes(context, "bbs_item_defaultfavorite");
			}
		}
		convertview = LayoutInflater.from(context).inflate(layoutid, viewgroup, false);
		viewholder = new FavoriteViewHolder();
		convertview.setTag(viewholder);
		viewholder.aivAvatar = findViewByResName(convertview, "bbs_item_favorite_aivAvatar");
		viewholder.aivPic = findViewByResName(convertview, "bbs_item_favorite_aivPic");
		viewholder.textViewAuthor = findViewByResName(convertview, "bbs_item_favorite_textViewAuthor");
		viewholder.textViewTitle = findViewByResName(convertview, "bbs_item_favorite_textViewTitle");
		viewholder.textViewSubject = findViewByResName(convertview, "bbs_item_favorite_textViewSubject");
		viewholder.textViewRightTime = findViewByResName(convertview, "bbs_item_favorite_textViewRightTime");
		ensureNoNullField(FavoriteViewHolder.class, viewholder);
	} else {
		viewholder = (FavoriteViewHolder) convertview.getTag();
	}
	try {
		viewholder.aivAvatar.setExecuteRound();
		//设置用户头像仅使用内存缓存而不缓存到磁盘
		viewholder.aivAvatar.execute(fthread.avatar, ResHelper.getBitmapRes(context, "bbs_login_account"));
		int defaultPicResId = ResHelper.getBitmapRes(context, "bbs_ic_def_no_pic");
		int errorPicResId = ResHelper.getBitmapRes(context, "bbs_ic_def_error_pic");
		if (fthread.images != null && fthread.images.size() > 0) {
			viewholder.aivPic.execute(fthread.images.get(0), defaultPicResId, errorPicResId);
		} else {
			viewholder.aivPic.setVisibility(View.GONE);
		}
		viewholder.textViewAuthor.setText(fthread.author);
		viewholder.textViewTitle.setText(fthread.subject);
		viewholder.textViewSubject.setText(fthread.forumName);
		viewholder.textViewRightTime.setText(com.mob.bbssdk.gui.utils.TimeUtils.timeDiff(context, fthread.createdOn));
	} catch (NullPointerException e) {
		e.printStackTrace();
	}
	return convertview;
}
 
开发者ID:MobClub,项目名称:BBSSDK-for-Android,代码行数:44,代码来源:ListViewItemBuilder.java


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