Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
API 16中的Android选项卡ico_Android_Api - Fatal编程技术网

API 16中的Android选项卡ico

API 16中的Android选项卡ico,android,api,Android,Api,我有一个应用程序,有4个标签,每个标签都有图标图像。我正在使用TabActivity和TabHost setIndicator(“示例”,getResources().getDrawable(R.drawable.tabicon)) 当清单文件中包含以下内容时,该应用程序可以与API 8配合使用: 但是,当我在清单中显式地放置targetSdkVersion=“16”时,选项卡图标没有显示 如何在不更改大量代码的情况下保留选项卡图标?对于API 16,是否有选项卡图标代码示例 非常感谢 Ta

我有一个应用程序,有4个标签,每个标签都有图标图像。我正在使用TabActivity和TabHost

setIndicator(“示例”,getResources().getDrawable(R.drawable.tabicon))

当清单文件中包含以下内容时,该应用程序可以与API 8配合使用:

但是,当我在清单中显式地放置targetSdkVersion=“16”时,选项卡图标没有显示

如何在不更改大量代码的情况下保留选项卡图标?对于API 16,是否有选项卡图标代码示例


非常感谢

TabActivity
TabHost
在API 11中被弃用

而是使用with Tabs(),以便与低于11的API版本兼容

不要再使用旧的API了