Action sur un bouton android
Bonjour à tous je découvre depuis ce weekend Android et eclipse en suivant different tutoriaux.
Voila je voulais savoir comment on definit une action sur mon bouton je suppose que c'est entre <button></button> ???
par exemple : modifier le text de mon textview en mettant un nouveau texte
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<Button android:id="@+id/Button01" android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="test"></Button>
<CheckBox android:text="@+id/CheckBox01" android:id="@+id/CheckBox01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#FFFF0000"></CheckBox>
<TextView android:text="test" android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content"></TextView>
</LinearLayout> |
Cordialement,
bypbop