如何修改 simple_list_item_2 上下两个 textview 的字体大小
来源:互联网 发布:php restful 框架 编辑:程序博客网 时间:2024/06/11 13:24
你这相当于自定义了,simpleAdapter没有改变文字大小的操作,你要想简单可以借用他的view,然后在设置他文字大小,代码如下:
- class StudentAdapter extends ArrayAdapter<String> {
- LayoutInflater inflator;
- public StudentAdapter(Context context) {
- super(context, 0);
- inflator = LayoutInflater.from(context);
- }
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- if (convertView == null) {
- convertView = inflator.inflate(android.R.layout.simple_list_item_2, parent, false);
- }
- TextView text1 = (TextView) convertView.findViewById(android.R.id.text1);
- TextView text2 = (TextView) convertView.findViewById(android.R.id.text2);
- text1.setTextSize(14);
- text2.setTextSize(12);
- text1.setText("title");
- text2.setText("summary");
- return convertView;
- }
- }
- 如何修改 simple_list_item_2 上下两个 textview 的字体大小
- 如何修改textview中的Hint字体大小
- 在代码中修改TextView的字体大小,指定单位
- eclipse的注释字体大小如何修改?
- 如何修改UIButton的字体大小和颜色
- 同一个TextView如何显示不同颜色的文字、字体大小、字体样式
- Myeclipse如何修改字体大小
- Android如何动态的给TextView左右上下添加图片
- Android中TextView的字体大小
- 动态更改textview的字体大小
- 实现上下滚动的TextView
- 实现上下滚动的TextView
- 实现上下滚动的TextView
- 如何改变CEdit中显示的字体大小并使其上下方向居中?
- 修改NetBeans的字体大小
- 修改UIWebview的字体大小
- 修改NetBeans的字体大小
- 修改plsql的字体大小
- linux sysfs(7)
- js正则函数match、exec、test、search、replace、split使用介绍
- android4.0自定义锁屏apk形式总结
- 筛法求100002(十万零二)个素数
- HEVC/H.265参考代码跟踪
- 如何修改 simple_list_item_2 上下两个 textview 的字体大小
- UML图 关系详解
- HDU 1114 Piggy-Bank
- 苏宁云商股票表现真的恨差劲!
- 一些ContentTyoe
- Eclipse 代码审查工具 Check Style
- preparestatement
- Cookie
- Date与String 类型间的转换 yyyy-MMM-dd