I'm developing on Android (not comfortable yet) a SettingsActivity, I got the one on templates, did some tweaks, and it's working fine. But I want to add a button to the end. My xml is now like this:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference
android:defaultValue="true"
android:key="gravacao_baby_near"
android:summaryOff="Quando o dispositivo estiver fora da zona segura, reproduzir aúdio gravado"
android:summaryOn="Quando o dispositivo estiver fora da zona segura, reproduzir aúdio gravado"
android:title="Habilitar reprodução da gravação" />
<EditTextPreference
android:capitalize="words"
android:defaultValue="Informações de emergência"
android:inputType="textMultiLine"
android:key="texto_tag"
android:maxLines="10"
android:selectAllOnFocus="true"
android:singleLine="false"
android:title="Texto exibido por Tag" />
<ListPreference
android:defaultValue="10"
android:entries="@array/settings_list_preference_titles"
android:entryValues="@array/settings_list_preference_values"
android:key="distancia_max_permitida"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="Distância aproximada máxima permitida" />
</PreferenceScreen>
What I tried to do was adding after the last ListPreference the following code, but it says "It's not allowed here":
<Button
android:id="@+id/gravarTag"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/gravarTag"
android:textAllCaps="false" />
How to do it the right way or the easy way?