Vous pouvez placer le bouton dans activity_layout.xml. Par exemple, si "Activity_Setup.java" est votre activité d'installation, "activity_setup.xml" est sa disposition, et "myprefs.xml" est le fichier dans lequel votre disposition de préférence est stockée, puis
vous devriez mettre le bouton dans "activity_setup.xml" dans la liste, le plus préférable dans un TableRow, comme ceci:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:id="@+id/llprefs">
<ListView
android:id="@+id/android:list"
android:tag="lvprefs"
android:layout_width="match_parent"
android:layout_height="0.0dp"
android:layout_weight="1" >
</ListView>
<TableRow
android:id="@+id/tableRow1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
>
<Button
android:id="@+id/btRegister"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/IdonothaveA"
android:onClick="onClick"
/>
<Button
android:id="@+id/btForgot"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/Iforgot"
android:onClick="onClick" />
<!--
<Button
android:id="@+id/btContact"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="@string/Contact"
android:onClick="onClick" />
-->
</TableRow>
Très bien, merci! :) – cody