Clean and Refractor code.

Split up the `SettingsActivity` into the smaller Fragments, Rename many 
ids... overall cleaner code.

It is 03:56 am and I did not sleep yet... I won't today ^^
This commit is contained in:
Finn M Glas 2020-05-24 03:59:25 +02:00
parent ff72364983
commit 0eecdff99f
No known key found for this signature in database
GPG key ID: 25037A2E81AB459C
21 changed files with 530 additions and 406 deletions

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragment_settings_meta_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorPrimary"
android:gravity="center|top"
android:orientation="vertical"
android:paddingTop="16sp"
android:paddingLeft="32sp"
android:paddingRight="32sp"
tools:context=".settings.SettingsFragmentMeta">
<Button
android:id="@+id/fragment_settings_meta_select_launcher_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_select_launcher"
android:textAllCaps="false" />
<Button
android:id="@+id/fragment_settings_meta_view_tutorial_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_show_tutorial"
android:textAllCaps="false" />
<Button
android:id="@+id/fragment_settings_meta_reset_settings_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="32sp"
android:text="@string/settings_reset"
android:textAllCaps="false" />
<Button
android:id="@+id/fragment_settings_meta_rate_app_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/settings_feedback"
android:textAllCaps="false" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32sp"
android:orientation="horizontal">
<TextView
android:id="@+id/fragment_settings_meta_footer_by_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_footer_by"
android:textSize="18sp" />
<TextView
android:id="@+id/fragment_settings_meta_footer_website_link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Finn M Glas"
android:textColor="?attr/colorAccent"
android:textSize="18sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/fragment_settings_meta_footer_pipe_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" | "
android:textSize="18sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/fragment_settings_meta_footer_github_link"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Open Source"
android:textColor="?attr/colorAccent"
android:textSize="18sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>