首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

如何动态修改适配器 中的背景色

2012-06-04 
怎么动态修改适配器 中的背景色SimpleAdapter adapter new SimpleAdapter(this, items, R.layout.sconte

怎么动态修改适配器 中的背景色
SimpleAdapter adapter = new SimpleAdapter(this, items, R.layout.scontent, 
  new String[] {"ls_content","ls_name","ls_time","ls_back"}, 
  new int[] {R.id.ls_content,R.id.ls_name, R.id.ls_time,R.id.layout});
  adapter.notifyDataSetChanged();


其中 R.id.layout 这种表现出来的是值text是"ls_back"


我想改成 R.id.layout.background

但是报错,,请问怎么改啊

[解决办法]
在OnResume方法中写逻辑代码处理

热点排行