Skip to content

Commit

Permalink
Moves all font size definitions to dimens.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
khwolf authored and TobiTenno committed Dec 21, 2023
1 parent b33c0b8 commit 339e8a8
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/layout/add_app_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
android:ems="10"
android:imeOptions="actionDone"
android:inputType="none|textNoSuggestions|textCapWords"
android:textSize="@dimen/_18ssp"
android:textSize="@dimen/font_size_add_apps_search"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/add_app_fragment_list_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
android:padding="6dp"
android:stateListAnimator="@xml/animate_scale"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp">
android:textSize="@dimen/font_size_apps_list_item">

</TextView>
6 changes: 3 additions & 3 deletions app/src/main/res/layout/customise_apps_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:layout_marginTop="@dimen/_8sdp"
android:text="@string/options_fragment_customise_apps"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_24ssp"
android:textSize="@dimen/font_size_customize_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand Down Expand Up @@ -47,7 +47,7 @@
android:padding="@dimen/_12sdp"
android:text="@string/customise_apps_fragment_add"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_18ssp"
android:textSize="@dimen/font_size_add_apps_action"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />

Expand All @@ -60,7 +60,7 @@
android:layout_marginBottom="8dp"
android:text="@string/customise_apps_fragment_remove_all"
android:padding="@dimen/_12sdp"
android:textSize="@dimen/_18ssp"
android:textSize="@dimen/font_size_add_apps_action"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/customise_apps_fragment_list_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:paddingRight="12dp"
android:text="="
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_24ssp"
android:textSize="@dimen/font_size_customize_apps_list_item"
app:layout_constraintBottom_toBottomOf="@+id/ca_list_item_app_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/ca_list_item_app_name"
Expand All @@ -34,7 +34,7 @@
android:maxLines="1"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_24ssp"
android:textSize="@dimen/font_size_customize_apps_list_item"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/ca_list_item_more_icon"
app:layout_constraintStart_toEndOf="@+id/ca_list_item_drag_handle"
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout/customize_app_drawer_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:layout_marginRight="@dimen/_16sdp"
android:text="@string/customize_app_drawer_fragment_visible_apps"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp"
android:textSize="@dimen/font_size_customize_options"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -30,9 +30,8 @@
android:layout_marginEnd="@dimen/_16sdp"
android:text="@string/customize_app_drawer_fragment_search_field_options"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp"
android:textSize="@dimen/font_size_customize_options"
app:layout_constraintStart_toStartOf="@id/customize_app_drawer_fragment_visible_apps"
app:layout_constraintTop_toBottomOf="@id/customize_app_drawer_fragment_visible_apps" />


</androidx.constraintlayout.widget.ConstraintLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
android:layout_height="wrap_content"
android:padding="6dp"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_18ssp" />
android:textSize="@dimen/font_size_visible_app_list_item" />
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:layout_marginTop="@dimen/_8sdp"
android:text="@string/options_fragment_customize_quick_buttons"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_24ssp"
android:textSize="@dimen/font_size_customize_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/home_fragment_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:hint="@string/add_apps_fragment_search_apps"
android:imeOptions="actionDone"
android:inputType="none|textNoSuggestions|textCapWords"
android:textSize="@dimen/_18ssp"
android:textSize="@dimen/font_size_drawer_search"
tools:ignore="Autofill,LabelFor" />

<ImageView
Expand Down Expand Up @@ -52,7 +52,7 @@
android:layout_marginTop="@dimen/_64sdp"
android:text="@string/main_placeholder_clock"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_40ssp" />
android:textSize="@dimen/font_size_home_clock" />

<TextView
android:id="@+id/home_fragment_date"
Expand All @@ -61,7 +61,7 @@
android:padding="@dimen/_4sdp"
android:text="@string/main_placeholder_date"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_18ssp" />
android:textSize="@dimen/font_size_home_date" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/home_fragment_list"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/main_fragment_list_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
android:padding="12dp"
android:stateListAnimator="@xml/animate_scale"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_24ssp">
android:textSize="@dimen/font_size_home_app_list_item">

</TextView>
16 changes: 8 additions & 8 deletions app/src/main/res/layout/options_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:stateListAnimator="@xml/animate_scale"
android:text="@string/main_fragment_options"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_24ssp"
android:textSize="@dimen/font_size_customize_title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -50,7 +50,7 @@
android:stateListAnimator="@xml/animate_scale"
android:text="@string/options_fragment_change_theme"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp"
android:textSize="@dimen/font_size_customize_options"
app:layout_constraintBottom_toTopOf="@+id/options_fragment_choose_time_format"
app:layout_constraintStart_toStartOf="@+id/options_fragment_device_settings"
app:layout_constraintTop_toBottomOf="@+id/options_fragment_device_settings" />
Expand All @@ -63,7 +63,7 @@
android:stateListAnimator="@xml/animate_scale"
android:text="@string/options_fragment_choose_time_format"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp"
android:textSize="@dimen/font_size_customize_options"
app:layout_constraintBottom_toTopOf="@+id/options_fragment_toggle_status_bar"
app:layout_constraintStart_toStartOf="@+id/options_fragment_change_theme"
app:layout_constraintTop_toBottomOf="@+id/options_fragment_change_theme" />
Expand All @@ -76,7 +76,7 @@
android:stateListAnimator="@xml/animate_scale"
android:text="@string/options_fragment_toggle_status_bar"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp"
android:textSize="@dimen/font_size_customize_options"
app:layout_constraintBottom_toTopOf="@+id/options_fragment_customise_apps"
app:layout_constraintStart_toStartOf="@+id/options_fragment_choose_time_format"
app:layout_constraintTop_toBottomOf="@+id/options_fragment_choose_time_format" />
Expand All @@ -90,7 +90,7 @@
android:stateListAnimator="@xml/animate_scale"
android:text="@string/options_fragment_customise_apps"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp"
android:textSize="@dimen/font_size_customize_options"
app:layout_constraintBottom_toTopOf="@+id/options_fragment_customize_quick_buttons"
app:layout_constraintStart_toStartOf="@+id/options_fragment_toggle_status_bar"
app:layout_constraintTop_toBottomOf="@+id/options_fragment_toggle_status_bar" />
Expand All @@ -104,7 +104,7 @@
android:stateListAnimator="@xml/animate_scale"
android:text="@string/options_fragment_customize_quick_buttons"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp"
android:textSize="@dimen/font_size_customize_options"
app:layout_constraintStart_toStartOf="@+id/options_fragment_customise_apps"
app:layout_constraintTop_toBottomOf="@+id/options_fragment_customise_apps" />

Expand All @@ -117,7 +117,7 @@
android:stateListAnimator="@xml/animate_scale"
android:text="@string/options_fragment_customize_app_drawer"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp"
android:textSize="@dimen/font_size_customize_options"
app:layout_constraintStart_toStartOf="@+id/options_fragment_customize_quick_buttons"
app:layout_constraintTop_toBottomOf="@+id/options_fragment_customize_quick_buttons" />

Expand All @@ -128,7 +128,7 @@
android:layout_marginTop="32dp"
android:text="@string/customize_app_drawer_fragment_auto_theme_wallpaper_text"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textSize="@dimen/_20ssp"
android:textSize="@dimen/font_size_customize_options"
android:layout_marginStart="@dimen/_16sdp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/options_fragment_customize_app_drawer" />
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="font_size_home_clock">@dimen/_40ssp</dimen>
<dimen name="font_size_home_date">@dimen/_18ssp</dimen>
<dimen name="font_size_home_app_list_item">@dimen/_24ssp</dimen>

<dimen name="font_size_drawer_search">@dimen/_18ssp</dimen>
<dimen name="font_size_apps_list_item">@dimen/_20ssp</dimen>
<!-- same list items in drawer and in search for apps to add -->

<dimen name="font_size_visible_app_list_item">@dimen/_18ssp</dimen>

<dimen name="font_size_customize_title">@dimen/_24ssp</dimen>
<dimen name="font_size_customize_options">@dimen/_20ssp</dimen>

<dimen name="font_size_customize_apps_list_item">@dimen/_24ssp</dimen>
<dimen name="font_size_add_apps_search">@dimen/_18ssp</dimen>
<dimen name="font_size_add_apps_action">@dimen/_18ssp</dimen>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/xml/home_motion_scene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/_4sdp"
android:textSize="@dimen/_18sdp"
android:textSize="@dimen/font_size_home_date"
app:layout_constraintEnd_toEndOf="@+id/home_fragment_time"
app:layout_constraintStart_toStartOf="@+id/home_fragment_time"
app:layout_constraintTop_toBottomOf="@+id/home_fragment_time" />
Expand Down

0 comments on commit 339e8a8

Please sign in to comment.