[android] Add offline explanation on download dialog

Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
Jean-Baptiste
2025-10-13 18:55:50 +02:00
committed by jeanbaptisteC
parent bdde42ce4e
commit f9a0dd1cb2
3 changed files with 45 additions and 0 deletions

View File

@@ -27,6 +27,27 @@
android:clipChildren="false" android:clipChildren="false"
android:gravity="center" android:gravity="center"
tools:ignore="UselessParent"> tools:ignore="UselessParent">
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_eighth"
android:gravity="center_horizontal"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/offline_explanation_title"/>
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_eighth"
android:gravity="center_horizontal"
android:textStyle="normal"
android:textAppearance="@style/MwmTextAppearance.Body1"
android:text="@string/offline_explanation_text"/>
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="@dimen/margin_quarter"
android:layout_marginBottom="@dimen/margin_quarter"/>
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/downloader_parent" android:id="@+id/downloader_parent"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@@ -19,6 +19,28 @@
android:background="@drawable/onmap_downloader_background" android:background="@drawable/onmap_downloader_background"
tools:ignore="UselessParent"> tools:ignore="UselessParent">
<com.google.android.material.textview.MaterialTextView
android:layout_width="@dimen/square_block_size"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_eighth"
android:gravity="center_horizontal"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/offline_explanation_title"/>
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="212dp"
android:layout_marginBottom="@dimen/margin_eighth"
android:gravity="center_horizontal"
android:textStyle="normal"
android:textAppearance="@style/MwmTextAppearance.Body1"
android:text="@string/offline_explanation_text"/>
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="@dimen/margin_quarter"
android:layout_marginBottom="@dimen/margin_quarter"/>
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/downloader_parent" android:id="@+id/downloader_parent"
android:layout_width="@dimen/square_block_size" android:layout_width="@dimen/square_block_size"

View File

@@ -932,4 +932,6 @@
<string name="unknown_count">unknown</string> <string name="unknown_count">unknown</string>
<string name="error_value_must_be_positive">The value must be positive</string> <string name="error_value_must_be_positive">The value must be positive</string>
<string name="error_invalid_number">Invalid number</string> <string name="error_invalid_number">Invalid number</string>
<string name="offline_explanation_title">Offline Maps</string>
<string name="offline_explanation_text">A map needs to be downloaded to view and navigate the area.\nDownload maps for areas you want to travel.</string>
</resources> </resources>