Improved Settings screen UI by making visible section divisions using Material Cards.
This commit is contained in:
parent
7424f7f6d2
commit
e2d4d20e7a
1 changed files with 197 additions and 104 deletions
|
@ -11,145 +11,238 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
|
||||||
android:paddingStart="@dimen/activity_horizontal_margin"
|
|
||||||
android:paddingEnd="@dimen/activity_horizontal_margin"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- General -->
|
<!-- General -->
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
style="@style/Widget.MaterialComponents.CardView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/title__general"
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||||
android:textAppearance="@style/TextAppearance.Bitsy.Subtitle1"
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
android:textStyle="bold"/>
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
|
app:contentPadding="@dimen/activity_vertical_margin"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
app:cardCornerRadius="@dimen/card_radius">
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<LinearLayout
|
||||||
android:id="@+id/switchAutoClose"
|
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_marginTop="@dimen/spacing_different_topic"
|
|
||||||
app:switchPadding="12dp"
|
|
||||||
android:text="@string/msg__close_timer"
|
|
||||||
android:textAppearance="@style/TextAppearance.Bitsy.Body1"
|
|
||||||
android:textColor="?android:textColorPrimary"/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<TextView
|
||||||
android:id="@+id/switchNightMode"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="@string/title__general"
|
||||||
android:layout_marginTop="@dimen/spacing_same_topic"
|
android:textAppearance="@style/TextAppearance.Bitsy.Subtitle1"
|
||||||
android:text="@string/msg__night_mode"
|
android:textStyle="bold"/>
|
||||||
android:textAppearance="@style/TextAppearance.Bitsy.Body1"
|
|
||||||
android:textColor="?android:textColorPrimary"/>
|
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
android:id="@+id/tvNetworkStatus"
|
android:id="@+id/switchAutoClose"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/spacing_same_topic"
|
android:layout_marginTop="@dimen/spacing_different_topic"
|
||||||
android:layout_marginEnd="2dp"
|
app:switchPadding="12dp"
|
||||||
android:text="@string/text__view_network_status"
|
android:text="@string/msg__close_timer"
|
||||||
android:gravity="center_vertical"
|
android:textAppearance="@style/TextAppearance.Bitsy.Body1"
|
||||||
android:textAppearance="@style/TextAppearance.Bitsy.Body1"
|
android:textColor="?android:textColorPrimary"/>
|
||||||
android:drawableEnd="@drawable/ic_disconnected"/>
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/switchNightMode"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_same_topic"
|
||||||
|
android:text="@string/msg__night_mode"
|
||||||
|
android:textAppearance="@style/TextAppearance.Bitsy.Body1"
|
||||||
|
android:textColor="?android:textColorPrimary"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvNetworkStatus"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_same_topic"
|
||||||
|
android:layout_marginEnd="2dp"
|
||||||
|
android:text="@string/text__view_network_status"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textAppearance="@style/TextAppearance.Bitsy.Body1"
|
||||||
|
android:drawableEnd="@drawable/ic_disconnected"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<!-- Security -->
|
<!-- Security -->
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
style="@style/Widget.MaterialComponents.CardView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/spacing_different_section"
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||||
android:text="@string/title__security"
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
android:textStyle="bold"/>
|
app:contentPadding="@dimen/activity_vertical_margin"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
app:cardCornerRadius="@dimen/card_radius">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/tvSecurityLock"
|
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_marginTop="@dimen/spacing_different_topic"
|
|
||||||
android:text="@string/text__security_lock"
|
|
||||||
android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvSecurityLockSelected"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:text="@string/title__security"
|
||||||
android:paddingTop="4dp"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
tools:text="PIN"
|
android:textStyle="bold"/>
|
||||||
android:textSize="16sp"/>
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvSecurityLock"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_different_topic"
|
||||||
|
android:text="@string/text__security_lock"
|
||||||
|
android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvSecurityLockSelected"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
tools:text="PIN"
|
||||||
|
android:textSize="16sp"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<!-- Backup -->
|
<!-- Backup -->
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
style="@style/Widget.MaterialComponents.CardView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/spacing_different_section"
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||||
android:text="@string/title__backup"
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
android:textStyle="bold"/>
|
app:contentPadding="@dimen/activity_vertical_margin"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
app:cardCornerRadius="@dimen/card_radius">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/spacing_different_topic"
|
android:orientation="vertical">
|
||||||
android:text="@string/msg__brainkey_description"
|
|
||||||
android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<TextView
|
||||||
android:id="@+id/btnViewBrainKey"
|
android:layout_width="match_parent"
|
||||||
style="@style/Widget.Bitsy.Button"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:text="@string/title__backup"
|
||||||
android:layout_height="wrap_content"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:layout_marginTop="@dimen/spacing_same_topic"
|
android:textStyle="bold"/>
|
||||||
android:text="@string/button__view_and_copy"/>
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_different_topic"
|
||||||
|
android:text="@string/msg__brainkey_description"
|
||||||
|
android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnViewBrainKey"
|
||||||
|
style="@style/Widget.Bitsy.Button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_same_topic"
|
||||||
|
android:text="@string/button__view_and_copy"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<!-- Accounts -->
|
<!-- Accounts -->
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
style="@style/Widget.MaterialComponents.CardView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||||
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
|
app:contentPadding="@dimen/activity_vertical_margin"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
app:cardCornerRadius="@dimen/card_radius">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/spacing_different_section"
|
android:orientation="vertical">
|
||||||
android:text="@string/title__accounts"
|
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/spacing_different_topic"
|
android:text="@string/title__accounts"
|
||||||
android:text="@string/msg__upgrade_to_ltm"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<TextView
|
||||||
android:id="@+id/btnUpgradeToLTM"
|
android:layout_width="match_parent"
|
||||||
style="@style/Widget.Bitsy.Button"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_marginTop="@dimen/spacing_different_topic"
|
||||||
android:layout_height="wrap_content"
|
android:text="@string/msg__upgrade_to_ltm"
|
||||||
android:layout_marginTop="@dimen/spacing_same_topic"
|
android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>
|
||||||
android:text="@string/button__upgrade_to_ltm"/>
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnUpgradeToLTM"
|
||||||
|
style="@style/Widget.Bitsy.Button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_same_topic"
|
||||||
|
android:text="@string/button__upgrade_to_ltm"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<!-- Bugs or Ideas -->
|
<!-- Bugs or Ideas -->
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:layout_width="wrap_content"
|
style="@style/Widget.MaterialComponents.CardView"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/spacing_different_section"
|
|
||||||
android:text="@string/title__bugs_or_ideas"
|
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/spacing_same_topic"
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||||
android:autoLink="all"
|
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||||
android:lineSpacingExtra="8dp"
|
android:layout_marginStart="@dimen/activity_horizontal_margin"
|
||||||
android:text="@string/msg__bugs_or_ideas"
|
android:layout_marginEnd="@dimen/activity_horizontal_margin"
|
||||||
android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>
|
app:contentPadding="@dimen/activity_vertical_margin"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
app:cardCornerRadius="@dimen/card_radius">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/title__bugs_or_ideas"
|
||||||
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/spacing_same_topic"
|
||||||
|
android:autoLink="all"
|
||||||
|
android:lineSpacingExtra="8dp"
|
||||||
|
android:text="@string/msg__bugs_or_ideas"
|
||||||
|
android:textAppearance="@style/TextAppearance.Bitsy.Body1"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue