mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[android] Update connection failure dialog cancellation behavior
- Update the connection failure dialog in the world download view based on reviewers' feedback. Signed-off-by: NoelClick <dev@noel.click>
This commit is contained in:
@@ -450,12 +450,16 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
.setTitle(titleId)
|
.setTitle(titleId)
|
||||||
.setMessage(messageId)
|
.setMessage(messageId)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setOnCancelListener((dialog) -> setAction(PAUSE))
|
.setOnCancelListener((dialog) -> setAction(RESUME))
|
||||||
.setPositiveButton(R.string.try_again,
|
.setPositiveButton(R.string.try_again,
|
||||||
(dialog, which) -> {
|
(dialog, which) -> {
|
||||||
setAction(TRY_AGAIN);
|
setAction(TRY_AGAIN);
|
||||||
onTryAgainClicked();
|
onTryAgainClicked();
|
||||||
})
|
})
|
||||||
|
.setNegativeButton(R.string.cancel,
|
||||||
|
(dialog, which) -> {
|
||||||
|
setAction(RESUME);
|
||||||
|
})
|
||||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
<string name="pref_left_button" translatable="false">LeftButton</string>
|
<string name="pref_left_button" translatable="false">LeftButton</string>
|
||||||
<string name="pref_power" translatable="false">pref_power</string>
|
<string name="pref_power" translatable="false">pref_power</string>
|
||||||
<string name="pref_custom_map_download_url" translatable="false">CustomMapDownloadUrl</string>
|
<string name="pref_custom_map_download_url" translatable="false">CustomMapDownloadUrl</string>
|
||||||
|
<string name="pref_advanced" translatable="false">pref_advanced</string>
|
||||||
|
|
||||||
<string name="notification_ticker_ltr" translatable="false">%1$s: %2$s</string>
|
<string name="notification_ticker_ltr" translatable="false">%1$s: %2$s</string>
|
||||||
<string name="notification_ticker_rtl" translatable="false">%2$s :%1$s</string>
|
<string name="notification_ticker_rtl" translatable="false">%2$s :%1$s</string>
|
||||||
|
|||||||
@@ -966,6 +966,8 @@
|
|||||||
<string name="offline_explanation_title">Offline Maps</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>
|
<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>
|
||||||
<string name="list_description_empty">Edit the list to add a description</string>
|
<string name="list_description_empty">Edit the list to add a description</string>
|
||||||
|
<!-- Settings: Advanced group -->
|
||||||
|
<string name="advanced">Advanced</string>
|
||||||
<!-- Custom Download URL -->
|
<!-- Custom Download URL -->
|
||||||
<string name="download_resources_custom_url_title">Custom Map Server</string>
|
<string name="download_resources_custom_url_title">Custom Map Server</string>
|
||||||
<string name="download_resources_custom_url_message">Override the default map download server used for map downloads. Leave empty to use CoMaps default server.</string>
|
<string name="download_resources_custom_url_message">Override the default map download server used for map downloads. Leave empty to use CoMaps default server.</string>
|
||||||
|
|||||||
@@ -144,7 +144,8 @@
|
|||||||
</intent>
|
</intent>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
</androidx.preference.PreferenceCategory>
|
</androidx.preference.PreferenceCategory>
|
||||||
<PreferenceCategory
|
|
||||||
|
<PreferenceCategory
|
||||||
android:key="@string/pref_power"
|
android:key="@string/pref_power"
|
||||||
android:title="@string/power_management"
|
android:title="@string/power_management"
|
||||||
android:order="4">
|
android:order="4">
|
||||||
@@ -190,7 +191,8 @@
|
|||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:widgetLayout="@layout/preference_switch"
|
android:widgetLayout="@layout/preference_switch"
|
||||||
android:order="5"/>
|
android:order="5"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<androidx.preference.PreferenceCategory
|
<androidx.preference.PreferenceCategory
|
||||||
android:key="@string/pref_privacy"
|
android:key="@string/pref_privacy"
|
||||||
android:title="@string/privacy"
|
android:title="@string/privacy"
|
||||||
@@ -212,11 +214,18 @@
|
|||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:widgetLayout="@layout/preference_switch"
|
android:widgetLayout="@layout/preference_switch"
|
||||||
android:order="2"/>
|
android:order="2"/>
|
||||||
<Preference
|
|
||||||
android:key="@string/pref_custom_map_download_url"
|
|
||||||
android:title="@string/download_resources_custom_url_title"
|
|
||||||
app:icon="@drawable/ic_cloud_download"
|
|
||||||
android:order="3" />
|
|
||||||
|
|
||||||
</androidx.preference.PreferenceCategory>
|
</androidx.preference.PreferenceCategory>
|
||||||
|
|
||||||
|
<androidx.preference.PreferenceCategory
|
||||||
|
android:key="@string/pref_advanced"
|
||||||
|
android:title="@string/advanced"
|
||||||
|
android:order="6">
|
||||||
|
<Preference
|
||||||
|
android:key="@string/pref_custom_map_download_url"
|
||||||
|
android:title="@string/download_resources_custom_url_title"
|
||||||
|
app:icon="@drawable/ic_cloud_download"
|
||||||
|
android:order="1" />
|
||||||
|
</androidx.preference.PreferenceCategory>
|
||||||
|
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
||||||
|
|||||||
Reference in New Issue
Block a user