Compare commits

...

3 Commits

Author SHA1 Message Date
Jean-Baptiste
3bad6d25f0 [android] Remove usage of attr fonts styles
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2025-12-13 19:28:28 +01:00
Jean-Baptiste
d36361d669 [android] Fix aligment of items in AppBar
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2025-12-13 17:08:35 +01:00
Jean-Baptiste
688e20b1a6 [android] Revert M3 changes about main fonts styles
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
2025-12-13 10:39:47 +01:00
18 changed files with 30 additions and 33 deletions

View File

@@ -26,7 +26,7 @@
app:tint="?colorSecondary"/>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/head_message"
style="?fontHeadline6"
style="@style/TextAppearance.Headline6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_base"
@@ -36,7 +36,7 @@
android:text="@string/download_map_title" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/download_message"
style="?fontBody2"
style="@style/TextAppearance.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_base"

View File

@@ -22,7 +22,7 @@
android:layout_marginStart="@dimen/margin_base"
android:maxLines="3"
android:ellipsize="end"
android:textAppearance="?fontHeadline6"
android:textAppearance="@style/TextAppearance.Headline6"
tools:text="Title" />
<androidx.recyclerview.widget.RecyclerView

View File

@@ -12,7 +12,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_base"
android:text="@string/download_country_ask"
android:textAppearance="?fontBody2"
android:textAppearance="@style/TextAppearance.Body2"
android:visibility="gone"
tools:visibility="visible"/>
<com.google.android.material.progressindicator.LinearProgressIndicator

View File

@@ -14,7 +14,6 @@
android:textAppearance="@style/MwmTextAppearance.Title" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/et__input_layout"
style="?fontBody1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintEnabled="false">

View File

@@ -27,7 +27,7 @@
android:layout_marginTop="@dimen/margin_base">
<RadioButton
style="?fontSubtitle1"
style="@style/TextAppearance.Subtitle1"
android:id="@+id/sort_by_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -37,7 +37,7 @@
app:buttonTint="@null"/>
<RadioButton
style="?fontSubtitle1"
style="@style/TextAppearance.Subtitle1"
android:id="@+id/sort_by_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -47,7 +47,7 @@
app:buttonTint="@null"/>
<RadioButton
style="?fontSubtitle1"
style="@style/TextAppearance.Subtitle1"
android:id="@+id/sort_by_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -57,7 +57,7 @@
app:buttonTint="@null"/>
<RadioButton
style="?fontSubtitle1"
style="@style/TextAppearance.Subtitle1"
android:id="@+id/sort_by_distance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -67,7 +67,7 @@
app:buttonTint="@null"/>
<RadioButton
style="?fontSubtitle1"
style="@style/TextAppearance.Subtitle1"
android:id="@+id/sort_by_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -17,7 +17,6 @@
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/edit_bookmark_name_input"
style="?fontBody1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/name"
@@ -88,7 +87,6 @@
tools:src="@drawable/ic_bookmark_none" />
</RelativeLayout>
<com.google.android.material.textfield.TextInputLayout
style="?fontBody1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_half"

View File

@@ -17,7 +17,7 @@
android:layout_marginEnd="@dimen/margin_base"
android:paddingTop="@dimen/margin_half"
android:paddingBottom="@dimen/margin_base"
android:textAppearance="?fontHeadline6"
android:textAppearance="@style/TextAppearance.Headline6"
tools:text="Xindian Shitoushan Trail" />
<include
layout="@layout/item_divider"

View File

@@ -16,7 +16,7 @@
android:layout_marginStart="@dimen/margin_base"
android:layout_marginTop="@dimen/margin_base"
android:text="@string/layers_title"
android:textAppearance="?fontHeadline6"
android:textAppearance="@style/TextAppearance.Headline6"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButton

View File

@@ -30,7 +30,7 @@
android:ellipsize="middle"
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="?fontBody1"
android:textAppearance="@style/TextAppearance.Body1"
tools:text="Bookmark name looooooooooooooooooongasdasdasd" />
<LinearLayout
android:id="@+id/bottom_line_container"

View File

@@ -25,7 +25,7 @@
android:layout_marginEnd="@dimen/bookmark_collection_item_end_margin"
android:ellipsize="middle"
android:singleLine="true"
android:textAppearance="?fontBody1"
android:textAppearance="@style/TextAppearance.Body1"
tools:text="Bookmark name looooooooooooooooooongasdasdasd" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/size"
@@ -37,7 +37,7 @@
android:ellipsize="end"
android:singleLine="true"
android:textColor="?android:textColorSecondary"
style="?fontBody2"
style="@style/TextAppearance.Body2"
tools:text="42000000" />
</LinearLayout>
</LinearLayout>

View File

@@ -12,7 +12,7 @@
android:paddingBottom="@dimen/margin_half_plus">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text_message"
style="?fontHeadline6"
style="@style/TextAppearance.Headline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"

View File

@@ -2,7 +2,7 @@
<com.google.android.material.textview.MaterialTextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text"
style="?fontHeadline6"
style="@style/TextAppearance.Headline6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?windowBackgroundForced"

View File

@@ -10,7 +10,6 @@
android:orientation="horizontal">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/input_layout"
style="?fontBody1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"

View File

@@ -29,7 +29,7 @@
android:layout_marginTop="@dimen/margin_base"
android:layout_marginEnd="@dimen/bookmark_collection_item_end_margin"
android:singleLine="true"
android:textAppearance="?fontBody1"
android:textAppearance="@style/TextAppearance.Body1"
tools:text="@string/tracks_title" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/tv__bookmark_distance"
@@ -39,7 +39,7 @@
android:layout_marginBottom="@dimen/margin_half_plus"
android:singleLine="true"
android:textColor="?android:textColorSecondary"
android:textAppearance="?fontBody2"
android:textAppearance="@style/TextAppearance.Body2"
tools:text="@string/by_distance" />
</LinearLayout>
<com.google.android.material.imageview.ShapeableImageView

View File

@@ -82,7 +82,7 @@
<com.google.android.material.textview.MaterialTextView
android:id="@+id/place_page_last_checked"
style="?fontCaption"
style="@style/TextAppearance.Caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/margin_half"

View File

@@ -65,7 +65,7 @@
<com.google.android.material.textview.MaterialTextView
android:id="@+id/oh_check_date"
style="?fontCaption"
style="@style/TextAppearance.Caption"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentEnd="true"

View File

@@ -26,7 +26,7 @@
<item name="android:fontFamily">@string/robotoMedium</item>
</style>
<style name="MwmTextAppearance.Body1" parent="TextAppearance.Material3.BodyLarge">
<style name="MwmTextAppearance.Body1" parent="TextAppearance.MaterialComponents.Headline6">
<item name="android:textSize">@dimen/text_size_body_1</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
@@ -35,11 +35,11 @@
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="MwmTextAppearance.Body1.Light" parent="TextAppearance.Material3.BodyLarge">
<style name="MwmTextAppearance.Body1.Light" parent="TextAppearance.MaterialComponents.Headline6">
<item name="android:textColor">?android:textColorPrimaryInverse</item>
</style>
<style name="MwmTextAppearance.Body2" parent="TextAppearance.Material3.BodyMedium">
<style name="MwmTextAppearance.Body2" parent="android:TextAppearance.Material.Medium">
<item name="android:textSize">@dimen/text_size_body_2</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
@@ -48,7 +48,7 @@
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="MwmTextAppearance.Body2.Light" parent="TextAppearance.Material3.BodyMedium">
<style name="MwmTextAppearance.Body2.Light" parent="android:TextAppearance.Material.Medium.Inverse">
<item name="android:textSize">@dimen/text_size_body_2</item>
<item name="android:textColor">?android:textColorPrimaryInverse</item>
</style>
@@ -58,7 +58,7 @@
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="MwmTextAppearance.Body3" parent="TextAppearance.Material3.BodySmall">
<style name="MwmTextAppearance.Body3">
<item name="android:textSize">@dimen/text_size_body_3</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
@@ -68,17 +68,17 @@
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="MwmTextAppearance.Body3.Light" parent="TextAppearance.Material3.BodySmall">
<style name="MwmTextAppearance.Body3.Light" parent="android:TextAppearance.Material.Inverse">
<item name="android:textSize">@dimen/text_size_body_3</item>
<item name="android:textColor">?android:textColorPrimaryInverse</item>
</style>
<style name="MwmTextAppearance.Body4" parent="TextAppearance.Material3.TitleSmall">
<style name="MwmTextAppearance.Body4" parent="TextAppearance.MaterialComponents.Subtitle2">
<item name="android:textSize">@dimen/text_size_body_4</item>
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="MwmTextAppearance.Body4.Light" parent="TextAppearance.Material3.TitleSmall">
<style name="MwmTextAppearance.Body4.Light" parent="TextAppearance.MaterialComponents.Subtitle2">
<item name="android:textSize">@dimen/text_size_body_4</item>
<item name="android:textColor">?android:textColorPrimaryInverse</item>
</style>

View File

@@ -139,12 +139,13 @@
<item name="cornerSize">50%</item>
</style>
<style name="MwmWidget.ToolbarStyle" parent="ThemeOverlay.Material3.Dark.ActionBar">
<style name="MwmWidget.ToolbarStyle" parent="Widget.Material3.Toolbar">
<item name="android:background">?colorPrimary</item>
<item name="android:displayOptions">homeAsUp|showTitle</item>
<item name="contentInsetStart">0dp</item>
<item name="android:titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title</item>
<item name="titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title</item>
<item name="buttonGravity">center_vertical</item>
</style>
<style name="MwmWidget.ToolbarStyle.Light">