为什么我TabHost的setIndicator设置了图片,但是我的应用显示却显示不出来呢

javamy004 javamy004 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

// th_host = (TabHost) this.findViewById(R.id.th_host);
th_host = getTabHost();
TabSpec ts_list = th_host.newTabSpec("List");
ts_list.setIndicator("列表",
getResources().getDrawable(R.drawable.list));
ts_list.setContent(R.id.lv_address);
th_host.addTab(ts_list);
TabSpec ts_edit = th_host.newTabSpec("Edit");
ts_edit.setIndicator("添加",
getResources().getDrawable(R.drawable.restaurant));
ts_edit.setContent(R.id.tb_details);
th_host.addTab(ts_edit);


哪里有问题呢?

谢谢
...全文
评论 6
收藏 已收藏
分享
返回顶部
javamy004
Android 80,489 成员 91,371 内容