Android xml increasing variable



Say I have these lines in strings.xml:



<string name="video">Video</string>
<string name="photo">Photo</string>
<string name="text">Text</string>


And these lines in my menu.xml file:



<item
android:id="@+id/video"
android:icon="@drawable/ic_game_50"
android:title="@string/video"
/>
<item
android:id="@+id/photo"
android:icon="@drawable/ic_help_50"
android:title="@string/photo"
/>
<item
android:id="@+id/text"
android:icon="@drawable/ic_help_50"
android:title="@string/text"
/>


I'd like to change this, so that instead of a constant strings of "Video", "Photo", "Text", it would be "Video[i]", etc.. when i is the step number and increases itself according to the times I'm running some intent.


Is it possible? Thanks!


No comments:

Post a Comment