I would like to use features of API level 11 if available in one of my XML-files within the layout folder. Therefore, I have the folder structure
layout -- myview.xml
layout-v11 -- myview.xml
where layout/myview.xml contains (within a LinearLayout) a simple
<TextView
android:id="@+id/value"
style="@style/MyStyle" />
whereas for API Level >= 11 I would like to add the textIsSelectable attribute in layout-v11/myview.xml:
<TextView
android:id="@+id/value"
android:textIsSelectable="true"
style="@style/MyStyle" />
However, during the build with Target platform set to API Level 8 in MonoDevelop, I get Error: No resource identifier found for attribute 'textIsSelectable' in package 'android'
.
在清单文件中使用targetSDKVersion(> = 11)和minSDKVersion = 8标签可解决此错误。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.