【发布时间】:2017-06-02 12:31:22
【问题描述】:
我在 Android 中将<tag> 用于View。我尝试为 Button 添加多个标签。
<Button
android:id="@+id/button"
android:layout_width="368dp"
android:layout_height="wrap_content"
android:text="CLOSE" >
<tag
android:id="@+id/close_one"
android:value="@string/close_one_string" />
<tag
android:id="@+id/close_two"
android:value="@string/close_two_string" />
</Button>
我在 Kitkat 平板电脑和 Marshmallow 平板电脑中执行了我的应用程序。在棉花糖中它工作正常。但在 kitkat 中它不会运行。
所以,我在互联网上搜索了与此主题相关的内容。在 stackoverflow 中,我找到了一个答案,即 API 级别 21 以上支持 <tag>。Click Here
之后我参考了我找到的 Android 文档,它支持 API 级别 4。Click Here
我的问题是如何在 Kitkat 中支持 <tag>?
【问题讨论】:
标签: android android-layout android-4.4-kitkat