Create Settings screen layout.

This commit is contained in:
Severiano Jaramillo 2018-12-11 16:22:55 -06:00
parent 2dc0deb23f
commit 410d22c5b0
6 changed files with 74 additions and 10 deletions

View file

@ -52,7 +52,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnNext" android:id="@+id/btnNext"
style="@style/Widget.PalmPay.Button" style="@style/Widget.Bitsy.Button"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"

View file

@ -71,7 +71,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnImport" android:id="@+id/btnImport"
style="@style/Widget.PalmPay.Button" style="@style/Widget.Bitsy.Button"
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:layout_marginTop="@dimen/spacing_different_topic"
@ -89,7 +89,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnCreate" android:id="@+id/btnCreate"
style="@style/Widget.PalmPay.Button" style="@style/Widget.Bitsy.Button"
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:layout_marginTop="@dimen/spacing_different_topic"

View file

@ -18,7 +18,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnAgree" android:id="@+id/btnAgree"
style="@style/Widget.PalmPay.Button" style="@style/Widget.Bitsy.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
@ -29,7 +29,7 @@
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnDisagree" android:id="@+id/btnDisagree"
style="@style/Widget.PalmPay.Button.TextButton" style="@style/Widget.Bitsy.Button.TextButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"

View file

@ -11,12 +11,70 @@
android:paddingBottom="32dp" android:paddingBottom="32dp"
tools:context=".activities.SettingsActivity"> tools:context=".activities.SettingsActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title__general"
android:textAppearance="@style/TextAppearance.Bitsy.Subtitle1"
android:textStyle="bold"/>
<Switch
android:id="@+id/switchCloseTimer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_different_topic"
android:switchPadding="12dp"
android:text="@string/msg__close_timer"
android:textAppearance="@style/TextAppearance.Bitsy.Body1"
android:textColor="?android:textColorPrimary"/>
<Switch <Switch
android:id="@+id/switchNightMode" 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/night_mode" android:layout_marginTop="@dimen/spacing_same_topic"
android:text="@string/msg__night_mode"
android:textAppearance="@style/TextAppearance.Bitsy.Body1" android:textAppearance="@style/TextAppearance.Bitsy.Body1"
android:textColor="?android:textColorPrimary"/> android:textColor="?android:textColorPrimary"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_different_section"
android:text="@string/title__backup"
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_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/btn__view_and_copy"/>
<TextView
android:layout_width="wrap_content"
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_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> </LinearLayout>

View file

@ -52,7 +52,13 @@
<!-- Settings --> <!-- Settings -->
<string name="title_settings">Settings</string> <string name="title_settings">Settings</string>
<string name="night_mode">Night mode</string> <string name="title__general">General</string>
<string name="msg__close_timer">Automatically close BiTSy after 3 minutes of inactivity</string>
<string name="msg__night_mode">Night mode</string>
<string name="title__backup">Backup</string>
<string name="msg__brainkey_description">BrainKey. Account recovery words that can be captured or copied, but not edited.</string>
<string name="btn__view_and_copy"><![CDATA[View & Copy]]></string>
<string name="title__bugs_or_ideas">Bugs or Ideas?</string>
<string name="msg__bugs_or_ideas">Telegram chat: http://t.me/Agorise\nEmail: Agorise@protonmail.ch\nOpen Source: https://github.com/Agorise</string>
</resources> </resources>

View file

@ -32,12 +32,12 @@
<style name="Widget.Bitsy.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox" /> <style name="Widget.Bitsy.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox" />
<style name="Widget.PalmPay.Button" parent="Widget.MaterialComponents.Button"> <style name="Widget.Bitsy.Button" parent="Widget.MaterialComponents.Button">
<item name="android:textColor">@android:color/white</item> <item name="android:textColor">@android:color/white</item>
<item name="android:stateListAnimator">@animator/button_state_list_anim</item> <item name="android:stateListAnimator">@animator/button_state_list_anim</item>
</style> </style>
<style name="Widget.PalmPay.Button.TextButton" parent="Widget.MaterialComponents.Button.TextButton"> <style name="Widget.Bitsy.Button.TextButton" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:textColor">?android:attr/colorPrimary</item> <item name="android:textColor">?android:attr/colorPrimary</item>
</style> </style>