[Q] Button double output topic
Guys I am trying to make a button that gives me two outputs but that also generates a plain text view, is this possible?
My buttons are
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Food"
android:id="@+id/button"
android:clickable="false" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Food2"
android:id="@+id/button2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Text"
android:id="@+id/textView" />
and the value for each sting
<string name="Food">12</string>
<string name="Food2">15</string>
Well I wanted the each button to display a name in a plain text view when I click on it and its value but I seem to fail every time I do it... Can anyone help?
My buttons are
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Food"
android:id="@+id/button"
android:clickable="false" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Food2"
android:id="@+id/button2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Text"
android:id="@+id/textView" />
and the value for each sting
<string name="Food">12</string>
<string name="Food2">15</string>
Well I wanted the each button to display a name in a plain text view when I click on it and its value but I seem to fail every time I do it... Can anyone help?
xda-developers
0 commentaires:
Enregistrer un commentaire