ITeye博客

Inflater生成View

AndLi · 2011-10-31 15:12 · Inflater · 移动开发 · Markdown

LayoutInflater inflater = LayoutInflater.from(ReportPrice.this);// 渲染器
		LinearLayout view = (LinearLayout)inflater.inflate(R.layout.reportprice_item, null);
		
		TextView variety_text = (TextView) view.findViewById(R.id.variety_text);
		variety_text.setText(category); // 设置TextextViewiew显示的内容
		TextView format_text = (TextView) view.findViewById(R.id.format_text);
		format_text.setText(format);
		EditText price_editText = (EditText) view.findViewById(R.id.price_et);
		price_editText.setText(String.valueOf(id));

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。