In Android XML, I want to add multiple values in android:tag. I found one way that we can use multiple for adding values.
<TextView
android:id="@+id/myTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<tag android:id="@+id/value_one" android:value="@string/value_one"/>
<tag android:id="@+id/value_two" android:value="@string/value_two"/>
<tag android:id="@+id/value_three" android:value="@string/value_three"/>
</TextView>
But this method work only in API level 21 and above. The Android provides the following error while using above method.
tag is only used in API level 21 and higher (current min is 19)
In API level 19, we have an option to set tag in programmatically. Is there any other option to add multiple strings or Object in XML itself?