Add a button to show example theme usages

+ Opens a browser
+ Shows the `/docs/README.md` file (to be created)
This commit is contained in:
Finn M Glas 2020-05-25 20:35:38 +02:00
parent 884ae7caac
commit c5fb46b0ae
No known key found for this signature in database
GPG key ID: 25037A2E81AB459C
5 changed files with 21 additions and 1 deletions

View file

@ -43,6 +43,7 @@ class SettingsFragmentTheme : Fragment() {
setButtonColor(fragment_settings_theme_select_finn_btn, vibrantColor)
setButtonColor(fragment_settings_theme_select_dark_btn, vibrantColor)
setButtonColor(fragment_settings_theme_select_custom_btn, vibrantColor)
setButtonColor(fragment_settings_theme_custom_examples_btn, vibrantColor)
}
}
@ -70,6 +71,10 @@ class SettingsFragmentTheme : Fragment() {
}
else letUserPickImage()
}
fragment_settings_theme_custom_examples_btn.setOnClickListener {
// Show example usage
openNewTabWindow("https://github.com/finnmglas/Launcher/blob/master/docs/README.md", context!!)
}
super.onStart()
}

View file

@ -2,6 +2,7 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:custom="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragment_settings_theme_container"
android:layout_width="match_parent"
@ -95,6 +96,7 @@
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
@ -110,6 +112,16 @@
android:textAllCaps="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/fragment_settings_theme_custom_examples_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_theme_examples"
android:textAllCaps="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/fragment_settings_theme_select_custom_btn" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>

View file

@ -34,6 +34,7 @@
<string name="settings_toast_store_not_found">PlayStore nicht gefunden</string>
<string name="settings_select_theme">Wählen</string>
<string name="settings_theme_examples">Beispiele</string>
<string name="settings_select_image">Bild ändern</string>
<string name="settings_footer_by">Von</string>

View file

@ -35,6 +35,7 @@
<string name="settings_select_theme">Choisir</string>
<string name="settings_select_image">Changer Image</string>
<string name="settings_theme_examples">Examples</string>
<string name="settings_footer_by">Par</string>
<string name="settings_footer_web">https://www.finnmglas.com/fr/</string>

View file

@ -43,6 +43,7 @@
<string name="settings_select_theme">Select</string>
<string name="settings_select_image">Change Image</string>
<string name="settings_theme_examples">Examples</string>
<string name="settings_footer_by">By</string>
<string name="settings_footer_repo">https://github.com/finnmglas/Launcher#en</string>