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:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch
android:id="@+id/prefAppEnabled" android:id="@+id/prefAppEnabled"
android:text="@string/str_enabled" 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"
app:layout_constraintBottom_toBottomOf="parent" android:minHeight="48dp" />
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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgLowEnableSound" android:id="@+id/prefMsgLowEnableSound"
android:text="@string/str_msg_enablesound" android:text="@string/str_msg_enablesound"
android:layout_marginStart="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"/>
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,20 +158,15 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:minHeight="48dp">
<LinearLayout <LinearLayout
android:id="@+id/prefMsgLowRingtone_container" 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:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintTop_toTopOf="parent"> android:layout_marginEnd="4dp"
android:minHeight="48dp"
android:gravity="center">
<TextView <TextView
android:id="@+id/tvMsgLowRingtone" android:id="@+id/tvMsgLowRingtone"
@ -207,9 +183,8 @@
android:spinnerMode="dialog" android:spinnerMode="dialog"
android:text="Whatever" android:text="Whatever"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </LinearLayout>
<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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgLowRepeatSound" android:id="@+id/prefMsgLowRepeatSound"
android:text="@string/str_repeatnotificationsound" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgLowEnableLED" android:id="@+id/prefMsgLowEnableLED"
android:text="@string/str_enable_led" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgLowEnableVibrations" android:id="@+id/prefMsgLowEnableVibrations"
android:text="@string/str_enable_vibration" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgNormEnableSound" android:id="@+id/prefMsgNormEnableSound"
android:text="@string/str_msg_enablesound" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -375,20 +315,15 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:minHeight="48dp">
<LinearLayout <LinearLayout
android:id="@+id/prefMsgNormRingtone_container" 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:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintTop_toTopOf="parent"> android:layout_marginEnd="4dp"
android:minHeight="48dp"
android:gravity="center">
<TextView <TextView
android:id="@+id/tvMsgNormRingtone" android:id="@+id/tvMsgNormRingtone"
@ -407,8 +342,6 @@
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
@ -416,23 +349,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgNormRepeatSound" android:id="@+id/prefMsgNormRepeatSound"
android:text="@string/str_repeatnotificationsound" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgNormEnableLED" android:id="@+id/prefMsgNormEnableLED"
android:text="@string/str_enable_led" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgNormEnableVibrations" android:id="@+id/prefMsgNormEnableVibrations"
android:text="@string/str_enable_vibration" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgHighEnableSound" android:id="@+id/prefMsgHighEnableSound"
android:text="@string/str_msg_enablesound" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
@ -573,18 +470,15 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:minHeight="48dp">
<LinearLayout <LinearLayout
android:id="@+id/prefMsgHighRingtone_container" 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_marginEnd="4dp"
android:minHeight="48dp"
android:orientation="vertical" android:orientation="vertical"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
@ -605,8 +499,6 @@
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
@ -614,23 +506,14 @@
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:background="#c0c0c0"/> android:background="#c0c0c0"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgHighRepeatSound" android:id="@+id/prefMsgHighRepeatSound"
android:text="@string/str_repeatnotificationsound" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgHighEnableLED" android:id="@+id/prefMsgHighEnableLED"
android:text="@string/str_enable_led" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</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
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp">
<Switch <Switch
android:id="@+id/prefMsgHighEnableVibrations" android:id="@+id/prefMsgHighEnableVibrations"
android:text="@string/str_enable_vibration" 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"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginStart="4dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="4dp"
app:layout_constraintTop_toTopOf="parent" /> android:minHeight="48dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>