Skip to content

Commit

Permalink
Slightly adapt design elements
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb3rko committed Dec 19, 2021
1 parent f2d21cc commit 6248204
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import androidx.appcompat.app.AppCompatDelegate
import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreferenceCompat
import androidx.preference.SwitchPreference
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.list.isItemChecked
import com.afollestad.materialdialogs.list.listItemsMultiChoice
Expand All @@ -24,15 +24,15 @@ class PreferenceFragment : PreferenceFragmentCompat() {

private lateinit var myContext: Context

private lateinit var analyticsCollectionSwitch: SwitchPreferenceCompat
private lateinit var connectionOverviewSwitch: SwitchPreferenceCompat
private lateinit var crashlyticsCollectionSwitch: SwitchPreferenceCompat
private lateinit var hideTopbarSwitch: SwitchPreferenceCompat
private lateinit var analyticsCollectionSwitch: SwitchPreference
private lateinit var connectionOverviewSwitch: SwitchPreference
private lateinit var crashlyticsCollectionSwitch: SwitchPreference
private lateinit var hideTopbarSwitch: SwitchPreference
private lateinit var mySPR: SharedPreferences
private lateinit var nightModeList: ListPreference
private lateinit var orientationList: ListPreference
private lateinit var openhabVersionList: ListPreference
private lateinit var stayAwakeSwitch: SwitchPreferenceCompat
private lateinit var stayAwakeSwitch: SwitchPreference

override fun onAttach(context: Context) {
super.onAttach(context)
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout/fragment_appintro4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="24dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:gravity="center_horizontal">

<TextView
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<string name="intro_fragment3_toast">Um fortzufahren stimme beidem zu</string>
<string name="intro_fragment4_check1">Ich stimme der Datensammlung über Analytics zu.</string>
<string name="intro_fragment4_check2">Ich stimme der Datensammlung über Crashlytics zu.</string>
<string name="intro_fragment4_description1">Du kannst mir durch Erlauben der Datensammlung dabei helfen, Bugs (schnell) zu fixen und die App-Performance zu verbessern (du kannst es in den Einstellungen später noch ändern):\n\n&lt;u>Firebase Analytics&lt;/u>:\nBereitstellung einfacher Nutzungsdaten, die in der Datenschutzerklärung erwähnt sind.</string>
<string name="intro_fragment4_description1">Du kannst mir durch Erlauben der Datensammlung dabei helfen, Bugs (schnell) zu fixen und die App-Performance zu verbessern (du kannst es in den Einstellungen später noch ändern):\n\n<u>Firebase Analytics</u>:\nBereitstellung einfacher Nutzungsdaten, die in der Datenschutzerklärung erwähnt sind.</string>
<string name="intro_fragment4_description2"><u>Firebase Crashlytics</u>:\nBereitstellung von Absturz-Protokollen dieser App, um die entsprechenden Fehler zu beheben.</string>
<string name="intro_fragment4_title">Datenerfassung</string>
<string name="intro_fragment5_description">OK, alles ist eingerichtet.\nViel Spaß!</string>
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<color name="colorPrimaryContainer">#76321e</color>
<color name="colorOnPrimaryContainer">#ffdacf</color>
<color name="colorPrimaryInverse">#934933</color>
<color name="colorSecondary">#e7bdb2</color>
<color name="colorSecondary">#BA5536</color>
<color name="colorOnSecondary">#442a22</color>
<color name="colorSecondaryContainer">#794031</color>
<color name="colorOnSecondaryContainer">#ffdacf</color>
Expand Down Expand Up @@ -34,5 +34,4 @@
<color name="toolBarTextColor">@color/colorOnPrimary</color>
<color name="textColor">#aeaeae</color>
<color name="cardColor">@color/colorSurface</color>
<color name="introElementColor">#212121</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<color name="colorPrimaryContainer">#ffdacf</color>
<color name="colorOnPrimaryContainer">#3c0800</color>
<color name="colorPrimaryInverse">#ffb49d</color>
<color name="colorSecondary">#77574d</color>
<color name="colorSecondary">#BA5536</color>
<color name="colorOnSecondary">@color/white</color>
<color name="colorSecondaryContainer">#ffdacf</color>
<color name="colorOnSecondaryContainer">#2c150f</color>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
<item name="md_corner_radius">10dp</item>
</style>

<style name="Button.AppIntro" parent="Widget.MaterialComponents.Button">
<style name="Button.AppIntro" parent="Widget.Material3.Button">
<item name="backgroundTint">@color/introElementColor</item>
<item name="android:textColor">@color/white</item>
</style>

<style name="Checkbox.AppIntro" parent="Widget.AppCompat.CompoundButton.CheckBox">
<style name="Checkbox.AppIntro" parent="Widget.Material3.CompoundButton.CheckBox">
<item name="android:textColor">@color/white</item>
<item name="android:textSize">@dimen/appintro_desctext_size</item>
<item name="android:padding">@dimen/appintro_desc_padding</item>
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:entryValues="@array/openhab_versions_values"
android:key="openhab_version" />

<SwitchPreferenceCompat
<SwitchPreference
android:title="@string/settings_hide_topbar_title"
android:summary="@string/settings_hide_topbar_summary"
app:iconSpaceReserved="false"
Expand All @@ -37,14 +37,14 @@
android:entryValues="@array/orientations_values"
android:key="orientation" />

<SwitchPreferenceCompat
<SwitchPreference
android:title="@string/settings_stay_awake_title"
android:summary="@string/settings_stay_awake_summary"
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="stay_awake" />

<SwitchPreferenceCompat
<SwitchPreference
android:title="@string/settings_connection_overview_title"
android:summary="@string/settings_connection_overview_summary"
app:iconSpaceReserved="false"
Expand Down Expand Up @@ -73,13 +73,13 @@
android:title="@string/settings_data_collection"
app:iconSpaceReserved="false">

<SwitchPreferenceCompat
<SwitchPreference
android:title="@string/settings_analytics_title"
android:summary="@string/settings_analytics_summary"
android:key="analytics_collection"
app:iconSpaceReserved="false" />

<SwitchPreferenceCompat
<SwitchPreference
android:title="@string/settings_crashlytics_title"
android:summary="@string/settings_crashlytics_summary"
android:key="crashlytics_collection"
Expand Down

0 comments on commit 6248204

Please sign in to comment.