simplify settings layout

This commit is contained in:
Mike Schwörer 2018-11-12 16:29:43 +01:00
parent 9d24044eb3
commit 96a236803e
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF

View File

@ -4,7 +4,6 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:ignore="TooManyViews"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".view.SettingsFragment"> tools:context=".view.SettingsFragment">
@ -33,23 +32,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:id="@+id/prefAppEnabled"
android:text="@string/str_enabled"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:minHeight="48dp" />
<Switch
android:id="@+id/prefAppEnabled"
android:text="@string/str_enabled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -152,23 +142,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:id="@+id/prefMsgLowEnableSound"
android:text="@string/str_msg_enablesound"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:minHeight="48dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"/>
android:minHeight="48dp">
<Switch
android:id="@+id/prefMsgLowEnableSound"
android:text="@string/str_msg_enablesound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -177,39 +158,33 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:id="@+id/prefMsgLowRingtone_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:minHeight="48dp"> android:minHeight="48dp"
android:gravity="center">
<LinearLayout <TextView
android:id="@+id/prefMsgLowRingtone_container" android:id="@+id/tvMsgLowRingtone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:text="@string/str_notificationsound"
app:layout_constraintBottom_toBottomOf="parent" android:textColor="#000" />
app:layout_constraintTop_toTopOf="parent">
<TextView <TextView
android:id="@+id/tvMsgLowRingtone" android:id="@+id/prefMsgLowRingtone_value"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/str_notificationsound" android:minWidth="64dp"
android:textColor="#000" /> android:spinnerMode="dialog"
android:text="Whatever"
tools:ignore="HardcodedText" />
<TextView </LinearLayout>
android:id="@+id/prefMsgLowRingtone_value"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="64dp"
android:spinnerMode="dialog"
android:text="Whatever"
tools:ignore="HardcodedText" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -218,23 +193,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgLowRepeatSound"
android:layout_marginEnd="4dp" android:text="@string/str_repeatnotificationsound"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgLowRepeatSound"
android:text="@string/str_repeatnotificationsound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -243,23 +209,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgLowEnableLED"
android:layout_marginEnd="4dp" android:text="@string/str_enable_led"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgLowEnableLED"
android:text="@string/str_enable_led"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -309,23 +266,15 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgLowEnableVibrations"
android:layout_marginEnd="4dp" android:text="@string/str_enable_vibration"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:minHeight="48dp" />
<Switch
android:id="@+id/prefMsgLowEnableVibrations"
android:text="@string/str_enable_vibration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>
@ -350,23 +299,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgNormEnableSound"
android:layout_marginEnd="4dp" android:text="@string/str_msg_enablesound"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgNormEnableSound"
android:text="@string/str_msg_enablesound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -375,39 +315,32 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:id="@+id/prefMsgNormRingtone_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:minHeight="48dp"> android:minHeight="48dp"
android:gravity="center">
<LinearLayout <TextView
android:id="@+id/prefMsgNormRingtone_container" android:id="@+id/tvMsgNormRingtone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:text="@string/str_notificationsound"
app:layout_constraintBottom_toBottomOf="parent" android:textColor="#000" />
app:layout_constraintTop_toTopOf="parent">
<TextView <TextView
android:id="@+id/tvMsgNormRingtone" android:id="@+id/prefMsgNormRingtone_value"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/str_notificationsound" android:minWidth="64dp"
android:textColor="#000" /> android:spinnerMode="dialog"
android:text="Whatever"
<TextView tools:ignore="HardcodedText" />
android:id="@+id/prefMsgNormRingtone_value" </LinearLayout>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="64dp"
android:spinnerMode="dialog"
android:text="Whatever"
tools:ignore="HardcodedText" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -416,23 +349,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgNormRepeatSound"
android:layout_marginEnd="4dp" android:text="@string/str_repeatnotificationsound"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgNormRepeatSound"
android:text="@string/str_repeatnotificationsound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -441,23 +365,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgNormEnableLED"
android:layout_marginEnd="4dp" android:text="@string/str_enable_led"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgNormEnableLED"
android:text="@string/str_enable_led"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -507,23 +422,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgNormEnableVibrations"
android:layout_marginEnd="4dp" android:text="@string/str_enable_vibration"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgNormEnableVibrations"
android:text="@string/str_enable_vibration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>
@ -548,23 +454,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgHighEnableSound"
android:layout_marginEnd="4dp" android:text="@string/str_msg_enablesound"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgHighEnableSound"
android:text="@string/str_msg_enablesound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -573,39 +470,34 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:id="@+id/prefMsgHighRingtone_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginEnd="4dp" android:layout_marginEnd="4dp"
android:minHeight="48dp"> android:minHeight="48dp"
android:orientation="vertical"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout <TextView
android:id="@+id/prefMsgHighRingtone_container" android:id="@+id/tvMsgHighRingtone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:text="@string/str_notificationsound"
app:layout_constraintBottom_toBottomOf="parent" android:textColor="#000" />
app:layout_constraintTop_toTopOf="parent">
<TextView <TextView
android:id="@+id/tvMsgHighRingtone" android:id="@+id/prefMsgHighRingtone_value"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/str_notificationsound" android:minWidth="64dp"
android:textColor="#000" /> android:spinnerMode="dialog"
android:text="Whatever"
<TextView tools:ignore="HardcodedText" />
android:id="@+id/prefMsgHighRingtone_value" </LinearLayout>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="64dp"
android:spinnerMode="dialog"
android:text="Whatever"
tools:ignore="HardcodedText" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -614,23 +506,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgHighRepeatSound"
android:layout_marginEnd="4dp" android:text="@string/str_repeatnotificationsound"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgHighRepeatSound"
android:text="@string/str_repeatnotificationsound"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -639,23 +522,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgHighEnableLED"
android:layout_marginEnd="4dp" android:text="@string/str_enable_led"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgHighEnableLED"
android:text="@string/str_enable_led"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -705,23 +579,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout <Switch
android:layout_marginStart="4dp" android:id="@+id/prefMsgHighEnableVibrations"
android:layout_marginEnd="4dp" android:text="@string/str_enable_vibration"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="48dp"> android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
<Switch android:minHeight="48dp" />
android:id="@+id/prefMsgHighEnableVibrations"
android:text="@string/str_enable_vibration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>