mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 12:34:24 +00:00
Compare commits
4 Commits
jb_dlt_lis
...
matheusgom
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
505a5c20de | ||
|
|
f5af8c8cd5 | ||
|
|
10398acedb | ||
|
|
38fc18b6e6 |
@@ -352,7 +352,6 @@ dependencies {
|
||||
implementation libs.androidx.work.runtime
|
||||
implementation libs.androidx.lifecycle.process
|
||||
implementation libs.androidx.documentfile
|
||||
// 1.13 Material library version doesn't render properly alpha properties on map buttons
|
||||
implementation libs.android.material
|
||||
// Fix for app/organicmaps/util/FileUploadWorker.java:14: error: cannot access ListenableFuture
|
||||
// https://github.com/organicmaps/organicmaps/issues/6106
|
||||
|
||||
@@ -446,7 +446,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
||||
default -> throw new AssertionError("Unexpected result code = " + result);
|
||||
};
|
||||
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(titleId)
|
||||
.setMessage(messageId)
|
||||
.setCancelable(true)
|
||||
|
||||
@@ -432,7 +432,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
}
|
||||
|
||||
dismissLocationErrorDialog();
|
||||
mLocationErrorDialog = new MaterialAlertDialogBuilder(MwmActivity.this)
|
||||
mLocationErrorDialog = new MaterialAlertDialogBuilder(MwmActivity.this, R.style.MwmTheme_AlertDialog)
|
||||
.setMessage(R.string.unknown_current_position)
|
||||
.setCancelable(true)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
@@ -655,7 +655,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
else
|
||||
{
|
||||
dismissAlertDialog();
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.message_invalid_feature_position)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||
@@ -1155,7 +1155,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
|
||||
if (type == IsolinesState.EXPIREDDATA)
|
||||
{
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.downloader_update_maps)
|
||||
.setMessage(R.string.isolines_activation_error_dialog)
|
||||
.setPositiveButton(
|
||||
@@ -1774,7 +1774,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
dismissAlertDialog();
|
||||
mAlertDialog =
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.unable_to_calc_alert_title)
|
||||
.setMessage(R.string.unable_to_calc_alert_subtitle)
|
||||
.setPositiveButton(R.string.settings,
|
||||
@@ -1797,7 +1797,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
builder.append(getString(resId)).append("\n\n");
|
||||
|
||||
dismissAlertDialog();
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.dialog_routing_disclaimer_title)
|
||||
.setMessage(builder.toString())
|
||||
.setCancelable(false)
|
||||
@@ -1846,7 +1846,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
return true;
|
||||
|
||||
final MapObject endPoint = Objects.requireNonNull(controller.getEndPoint());
|
||||
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this)
|
||||
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.p2p_only_from_current)
|
||||
.setMessage(R.string.p2p_reroute_from_current)
|
||||
.setCancelable(false)
|
||||
@@ -2040,7 +2040,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
mPreciseLocationDialogShown = true;
|
||||
final MaterialAlertDialogBuilder builder =
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle("⚠ " + getString(R.string.limited_accuracy))
|
||||
.setMessage(R.string.precise_location_is_disabled_long_text)
|
||||
.setNegativeButton(R.string.close, (dialog, which) -> dialog.dismiss())
|
||||
@@ -2074,7 +2074,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
return;
|
||||
}
|
||||
|
||||
mLocationErrorDialog = new MaterialAlertDialogBuilder(this)
|
||||
mLocationErrorDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.enable_location_services)
|
||||
.setMessage(R.string.location_is_disabled_long_text)
|
||||
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
||||
@@ -2167,7 +2167,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
return;
|
||||
}
|
||||
|
||||
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this)
|
||||
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.enable_location_services)
|
||||
.setMessage(R.string.location_is_disabled_long_text)
|
||||
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
||||
@@ -2253,7 +2253,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
|
||||
dismissAlertDialog();
|
||||
final MaterialAlertDialogBuilder builder =
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.current_location_unknown_error_title)
|
||||
.setCancelable(true)
|
||||
.setMessage(R.string.power_save_dialog_summary)
|
||||
@@ -2278,7 +2278,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
dismissAlertDialog();
|
||||
mAlertDialog =
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.load_kmz_title)
|
||||
.setMessage(getString(R.string.unknown_file_type, uri))
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
@@ -2295,7 +2295,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
dismissAlertDialog();
|
||||
mAlertDialog =
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.load_kmz_title)
|
||||
.setMessage(getString(R.string.failed_to_open_file, uri, error))
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
@@ -2317,7 +2317,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
public void onBookmarksFileImportFailed()
|
||||
{
|
||||
dismissAlertDialog();
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.load_kmz_title)
|
||||
.setMessage(R.string.load_kmz_failed)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
@@ -2578,7 +2578,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
|
||||
private void reportUnsupported()
|
||||
{
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setMessage(R.string.unsupported_phone)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.close, (dlg, which) -> this.moveTaskToBack(true))
|
||||
|
||||
@@ -120,7 +120,7 @@ public class SplashActivity extends AppCompatActivity
|
||||
private void showFatalErrorDialog(@StringRes int titleId, @StringRes int messageId, Exception error)
|
||||
{
|
||||
mCanceled = true;
|
||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_M3_AlertDialog)
|
||||
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(titleId)
|
||||
.setMessage(messageId)
|
||||
.setPositiveButton(
|
||||
|
||||
@@ -197,6 +197,8 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
||||
() -> onShareActionSelected(mSelectedCategory, KmlFileType.Text)));
|
||||
items.add(new MenuBottomSheetItem(R.string.export_file_gpx, R.drawable.ic_file_gpx,
|
||||
() -> onShareActionSelected(mSelectedCategory, KmlFileType.Gpx)));
|
||||
// Disallow deleting the last category
|
||||
if (getAdapter().getBookmarkCategories().size() > 1)
|
||||
items.add(new MenuBottomSheetItem(R.string.delete, R.drawable.ic_delete,
|
||||
() -> onDeleteActionSelected(mSelectedCategory)));
|
||||
}
|
||||
@@ -294,26 +296,10 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
||||
}
|
||||
|
||||
private void onDeleteActionSelected(@NonNull BookmarkCategory category)
|
||||
{
|
||||
// Disallow deleting the last category
|
||||
if ((getAdapter().getBookmarkCategories().size() > 1))
|
||||
{
|
||||
BookmarkManager.INSTANCE.deleteCategory(category.getId());
|
||||
getAdapter().notifyDataSetChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
.setMessage(R.string.unable_to_delete_list)
|
||||
.setPositiveButton(android.R.string.yes, ((dialog, which) -> {
|
||||
onAddButtonClick();
|
||||
BookmarkManager.INSTANCE.deleteCategory(category.getId());
|
||||
getAdapter().notifyDataSetChanged();
|
||||
}))
|
||||
.setNegativeButton(android.R.string.no,(dialog, which) -> dialog.dismiss())
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void onSettingsActionSelected(@NonNull BookmarkCategory category)
|
||||
{
|
||||
|
||||
@@ -60,14 +60,14 @@ public enum BookmarksSharingHelper
|
||||
case BookmarkSharingResult.SUCCESS ->
|
||||
SharingUtils.shareBookmarkFile(context, launcher, result.getSharingPath(), result.getMimeType());
|
||||
case BookmarkSharingResult.EMPTY_CATEGORY ->
|
||||
new MaterialAlertDialogBuilder(context)
|
||||
new MaterialAlertDialogBuilder(context, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.bookmarks_error_title_share_empty)
|
||||
.setMessage(R.string.bookmarks_error_message_share_empty)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.show();
|
||||
case BookmarkSharingResult.ARCHIVE_ERROR, BookmarkSharingResult.FILE_ERROR ->
|
||||
{
|
||||
new MaterialAlertDialogBuilder(context)
|
||||
new MaterialAlertDialogBuilder(context, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.dialog_routing_system_error)
|
||||
.setMessage(R.string.bookmarks_error_message_share_general)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
|
||||
@@ -114,6 +114,7 @@ public final class CarAppSession extends Session implements DefaultLifecycleObse
|
||||
public void onCreate(@NonNull LifecycleOwner owner)
|
||||
{
|
||||
Logger.d(TAG);
|
||||
Framework.nativeSetCarScreenMode(true);
|
||||
mSensorsManager = new CarSensorsManager(getCarContext());
|
||||
mDisplayManager = MwmApplication.from(getCarContext()).getDisplayManager();
|
||||
mDisplayManager.addListener(DisplayType.Car, this);
|
||||
@@ -159,6 +160,7 @@ public final class CarAppSession extends Session implements DefaultLifecycleObse
|
||||
public void onDestroy(@NonNull LifecycleOwner owner)
|
||||
{
|
||||
mDisplayManager.removeListener(DisplayType.Car);
|
||||
Framework.nativeSetCarScreenMode(false);
|
||||
}
|
||||
|
||||
private void init()
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class CustomMapServerDialog
|
||||
edit.setText(current);
|
||||
|
||||
MaterialAlertDialogBuilder builder =
|
||||
new MaterialAlertDialogBuilder(context)
|
||||
new MaterialAlertDialogBuilder(context, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.download_resources_custom_url_title)
|
||||
.setMessage(R.string.download_resources_custom_url_message)
|
||||
.setView(dialogView)
|
||||
|
||||
@@ -113,7 +113,7 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment
|
||||
negativeButtonText = args.getString(ARG_NEGATIVE_BUTTON);
|
||||
}
|
||||
|
||||
AlertDialog editTextDialog = new MaterialAlertDialogBuilder(requireActivity())
|
||||
AlertDialog editTextDialog = new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setView(buildView())
|
||||
.setNegativeButton(negativeButtonText, null)
|
||||
.setPositiveButton(positiveButtonText, null)
|
||||
|
||||
@@ -119,7 +119,7 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
||||
{
|
||||
if (RoutingController.get().isNavigating())
|
||||
{
|
||||
new MaterialAlertDialogBuilder(adapter.mActivity)
|
||||
new MaterialAlertDialogBuilder(adapter.mActivity, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.downloader_delete_map)
|
||||
.setMessage(R.string.downloader_delete_map_while_routing_dialog)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
@@ -133,7 +133,7 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
||||
return;
|
||||
}
|
||||
|
||||
new MaterialAlertDialogBuilder(adapter.mActivity)
|
||||
new MaterialAlertDialogBuilder(adapter.mActivity, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.downloader_delete_map)
|
||||
.setMessage(R.string.downloader_delete_map_dialog)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
||||
@@ -49,7 +49,7 @@ public class MapManagerHelper
|
||||
return;
|
||||
}
|
||||
|
||||
final AlertDialog dlg = new MaterialAlertDialogBuilder(activity)
|
||||
final AlertDialog dlg = new MaterialAlertDialogBuilder(activity, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.country_status_download_failed)
|
||||
.setMessage(getErrorCodeStrRes(errorData.errorCode))
|
||||
.setNegativeButton(R.string.cancel,
|
||||
@@ -72,7 +72,7 @@ public class MapManagerHelper
|
||||
|
||||
private static void notifyNoSpaceInternal(Activity activity)
|
||||
{
|
||||
new MaterialAlertDialogBuilder(activity)
|
||||
new MaterialAlertDialogBuilder(activity, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.downloader_no_space_title)
|
||||
.setMessage(R.string.downloader_no_space_message)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
@@ -123,7 +123,7 @@ public class MapManagerHelper
|
||||
return false;
|
||||
}
|
||||
|
||||
new MaterialAlertDialogBuilder(activity)
|
||||
new MaterialAlertDialogBuilder(activity, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.download_over_mobile_header)
|
||||
.setMessage(R.string.download_over_mobile_message)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
||||
@@ -493,7 +493,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
}
|
||||
});
|
||||
|
||||
return new MaterialAlertDialogBuilder(requireActivity())
|
||||
return new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.editor_socket)
|
||||
.setView(dialogView)
|
||||
.setPositiveButton(R.string.save,
|
||||
@@ -997,7 +997,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
message = R.string.editor_reset_edits_message;
|
||||
}
|
||||
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(message)
|
||||
.setPositiveButton(title,
|
||||
(dialog, which) -> {
|
||||
@@ -1020,7 +1020,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
|
||||
private void placeDisused()
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.editor_mark_business_vacant_title)
|
||||
.setMessage(R.string.editor_mark_business_vacant_description)
|
||||
.setPositiveButton(R.string.editor_submit, (dlg, which) -> {
|
||||
|
||||
@@ -352,7 +352,7 @@ public class EditorHostFragment
|
||||
|
||||
private void processNoFeatures()
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.downloader_no_space_title)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.show();
|
||||
@@ -386,7 +386,7 @@ public class EditorHostFragment
|
||||
|
||||
private void showNoobDialog()
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.editor_share_to_all_dialog_title)
|
||||
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
||||
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
||||
|
||||
@@ -155,7 +155,7 @@ public class FeatureCategoryFragment
|
||||
// Duplicate of showNoobDialog()
|
||||
private void showNoteConfirmationDialog(double lat, double lon, String noteText)
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.editor_share_to_all_dialog_title)
|
||||
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
||||
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
||||
|
||||
@@ -79,7 +79,7 @@ public class OsmLoginFragment extends BaseMwmToolbarFragment
|
||||
|
||||
private void onAuthFail()
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.editor_login_error_dialog)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.show();
|
||||
|
||||
@@ -66,7 +66,7 @@ public class FaqFragment extends BaseMwmFragment
|
||||
FloatingActionButton feedbackFab = root.findViewById(R.id.feedback_fab);
|
||||
feedbackFab.setOnClickListener(
|
||||
v
|
||||
-> new MaterialAlertDialogBuilder(requireActivity())
|
||||
-> new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.feedback)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.setItems(new CharSequence[] {getString(R.string.feedback_general), getString(R.string.report_a_bug)},
|
||||
|
||||
@@ -107,7 +107,7 @@ public class TrafficButtonController implements TrafficManager.TrafficCallback
|
||||
if (mDialog != null && mDialog.isShowing())
|
||||
return;
|
||||
|
||||
mDialog = new MaterialAlertDialogBuilder(mActivity)
|
||||
mDialog = new MaterialAlertDialogBuilder(mActivity, R.style.MwmTheme_AlertDialog)
|
||||
.setMessage(R.string.common_check_internet_connection_dialog)
|
||||
.setPositiveButton(R.string.ok, (dialog, which) -> TrafficManager.INSTANCE.setEnabled(false))
|
||||
.setCancelable(true)
|
||||
|
||||
@@ -56,7 +56,7 @@ abstract class BaseRoutingErrorDialogFragment extends BaseMwmDialogFragment
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState)
|
||||
{
|
||||
parseArguments();
|
||||
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireActivity())
|
||||
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setCancelable(true)
|
||||
.setNegativeButton(android.R.string.cancel, null);
|
||||
beforeDialogCreated(builder);
|
||||
|
||||
@@ -494,7 +494,7 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
|
||||
pref.setOnPreferenceClickListener(preference -> {
|
||||
if (MapManager.nativeIsDownloading())
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.downloading_is_active)
|
||||
.setMessage(R.string.cant_change_this_setting)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
|
||||
@@ -97,7 +97,7 @@ public class StoragePathFragment extends BaseSettingsFragment
|
||||
final String oldPath = storages.get(currentIndex).mPath;
|
||||
final String newPath = storages.get(newIndex).mPath;
|
||||
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setCancelable(false)
|
||||
.setTitle(R.string.move_maps)
|
||||
.setPositiveButton(R.string.ok, (dlg, which) -> moveStorage(newPath, oldPath))
|
||||
@@ -133,7 +133,7 @@ public class StoragePathFragment extends BaseSettingsFragment
|
||||
|
||||
if (!result)
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity())
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.move_maps_error)
|
||||
.setPositiveButton(
|
||||
R.string.report_a_bug,
|
||||
|
||||
@@ -47,7 +47,7 @@ public class BookmarkColorDialogFragment extends BaseMwmDialogFragment
|
||||
mIconResId = getArguments().getInt(ICON_RES);
|
||||
}
|
||||
|
||||
return new MaterialAlertDialogBuilder(requireActivity())
|
||||
return new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setView(buildView())
|
||||
.setTitle(R.string.choose_color)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
||||
@@ -464,7 +464,7 @@ public class PlacePageController
|
||||
mAlertDialog.show();
|
||||
return;
|
||||
}
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(requireContext(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(requireContext().getString(R.string.delete_track_dialog_title, mMapObject.getTitle()))
|
||||
.setCancelable(true)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
android:color="?colorControlHighlight">
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="?appBackground" />
|
||||
<solid android:color="?cardBackground" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/mask">
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.Material3.CardView.Filled"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/margin_half"
|
||||
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
|
||||
app:cardCornerRadius="28dp">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:background="?cardBackground">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
@@ -55,4 +49,3 @@
|
||||
tools:text="Do not Use Today"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -22,9 +22,12 @@
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="ScrollViewSize">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
@@ -108,5 +111,6 @@
|
||||
android:text="@string/register_at_openstreetmap" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
android:id="@+id/street_frame"
|
||||
android:layout_width="500dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3.CardView.Filled"
|
||||
android:layout_marginEnd="@dimen/margin_quarter"
|
||||
app:cardCornerRadius="@dimen/margin_half"
|
||||
android:elevation="@dimen/nav_elevation"
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="?menuBackground"
|
||||
android:backgroundTint="?menuBackground"
|
||||
android:background="@drawable/onmap_downloader_background"
|
||||
android:padding="@dimen/margin_base"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
style="@style/Widget.Material3.CardView.Filled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/margin_double_and_half"
|
||||
android:background="?cardBackground"
|
||||
android:minWidth="@dimen/dialog_min_width"
|
||||
android:minHeight="@dimen/dialog_min_height"
|
||||
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
|
||||
app:cardCornerRadius="28dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/margin_base_plus">
|
||||
|
||||
@@ -82,4 +77,3 @@
|
||||
app:buttonTint="@null"/>
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.Material3.CardView.Filled"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/margin_half"
|
||||
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
|
||||
app:cardCornerRadius="28dp">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:background="?cardBackground">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
@@ -47,4 +41,3 @@
|
||||
style="@style/MwmWidget.Button.StackedButtonsDialog"
|
||||
tools:text="Do not Use Today"/>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
android:paddingTop="@dimen/margin_half"
|
||||
android:paddingBottom="@dimen/margin_half"
|
||||
android:layout_marginEnd="@dimen/margin_base"
|
||||
android:background="?cardBackground"
|
||||
android:textAppearance="@style/MwmTextAppearance.Caption"
|
||||
tools:text="Downloaded"
|
||||
tools:background="#80FF0000"/>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:id="@+id/rl__bookmark_details"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:padding="@dimen/margin_half">
|
||||
<LinearLayout
|
||||
android:id="@+id/ll__bookmark_name"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
@@ -69,6 +69,7 @@
|
||||
android:inputType="textMultiLine"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<View
|
||||
android:background="?cardBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -11,6 +11,5 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical"
|
||||
android:fadeScrollbars="false"
|
||||
android:background="?appBackground"/>
|
||||
android:fadeScrollbars="false" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/MwmWidget.Floating"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<include layout="@layout/toolbar_with_search"/>
|
||||
@@ -17,12 +17,10 @@
|
||||
style="@style/MwmWidget.Button.Primary"
|
||||
tools:text="@string/downloader_update_all_button"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler"
|
||||
<include
|
||||
layout="@layout/recycler_default"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?appBackground"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_above="@id/action"/>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?appBackground">
|
||||
android:background="?cardBackground">
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/MwmWidget.ToolbarStyle"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="?windowBackgroundForced"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/frameLayout"
|
||||
android:background="?windowBackgroundForced">
|
||||
android:background="?cardBackground">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/phones_recycler"
|
||||
|
||||
@@ -61,12 +61,12 @@
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?appBackground">
|
||||
android:background="?cardBackground">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler"
|
||||
android:clipToPadding="false"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
style="@style/MwmWidget.FrameLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?appBackground"
|
||||
android:scrollbars="vertical"/>
|
||||
<include
|
||||
layout="@layout/recycler_default"/>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -16,22 +16,10 @@
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_half"
|
||||
style="@style/MwmWidget.M3.Editor.CardView"
|
||||
app:cardBackgroundColor="?cardBackground">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/examples"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:animateLayoutChanges="true">
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/margin_half"
|
||||
android:layout_marginBottom="@dimen/margin_half"
|
||||
app:hintEnabled="false">
|
||||
card_view:cardBackgroundColor="?cardBackground"
|
||||
card_view:cardCornerRadius="2dp"
|
||||
card_view:cardElevation="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et__timetable"
|
||||
@@ -45,7 +33,23 @@
|
||||
android:textAppearance="@style/MwmTextAppearance.Body3"
|
||||
tools:hint="hint"
|
||||
tools:text="trololo \ntrololo \ntrololo"/>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_half"
|
||||
card_view:cardBackgroundColor="?cardBackground"
|
||||
card_view:cardCornerRadius="2dp"
|
||||
card_view:cardElevation="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/examples"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:animateLayoutChanges="true">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/tv__examples_title"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:padding="@dimen/margin_base">
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
style="@style/MwmTextAppearance.Headline6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?appBackground"
|
||||
android:background="?windowBackgroundForced"
|
||||
android:gravity="start|center_vertical"
|
||||
android:paddingStart="@dimen/margin_base"
|
||||
android:paddingTop="@dimen/margin_base_plus"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:padding="@dimen/margin_base">
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorSurfaceContainerHigh"
|
||||
android:background="?cardBackground"
|
||||
android:minHeight="@dimen/height_item_oneline"
|
||||
android:paddingStart="@dimen/margin_base_plus"
|
||||
android:paddingEnd="@dimen/margin_base_plus">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorSurfaceContainerHigh"
|
||||
android:background="?cardBackground"
|
||||
android:minHeight="@dimen/height_item_oneline"
|
||||
android:paddingStart="@dimen/margin_base_plus"
|
||||
android:paddingEnd="@dimen/margin_base_plus">
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
android:id="@+id/street_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3.CardView.Filled"
|
||||
android:layout_marginStart="@dimen/nav_street_left"
|
||||
android:layout_marginEnd="@dimen/margin_quarter"
|
||||
app:cardCornerRadius="@dimen/margin_half"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
android:id="@+id/menu_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:padding="@dimen/margin_base"
|
||||
android:text="@string/editor_focus_map_on_location"
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolbar_point_chooser" />
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/height_block_base"
|
||||
android:background="?appBackground"
|
||||
android:background="?cardBackground"
|
||||
android:baselineAligned="false">
|
||||
<LinearLayout
|
||||
android:id="@+id/btn__search_point"
|
||||
|
||||
@@ -146,13 +146,16 @@
|
||||
android:foreground="@drawable/shadow_top"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/driving_options_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:gravity="center"
|
||||
android:minHeight="@dimen/height_block_base">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/driving_options_btn_img"
|
||||
android:layout_width="@dimen/margin_base_plus"
|
||||
@@ -172,6 +175,7 @@
|
||||
android:textColor="@color/text_light"
|
||||
tools:text="test" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
style="@style/MwmWidget.FrameLayout.Elevation"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<item name="android:textColorPrimary">@color/text_light</item>
|
||||
<item name="android:textColorPrimaryInverse">@color/text_dark</item>
|
||||
<item name="android:textColorSecondary">@color/text_light_subtitle</item>
|
||||
<item name="android:windowBackground">?appBackground</item>
|
||||
<item name="android:windowBackground">?windowBackgroundForced</item>
|
||||
<item name="android:colorPrimaryDark">@color/bg_primary_dark</item>
|
||||
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
|
||||
<item name="android:fontFamily">@string/robotoRegular</item>
|
||||
@@ -21,7 +21,7 @@
|
||||
<item name="android:statusBarColor">?colorPrimary</item>
|
||||
<item name="android:windowTranslucentNavigation">false</item>
|
||||
|
||||
<item name="alertDialogTheme">@style/MwmTheme.M3.AlertDialog</item>
|
||||
<item name="alertDialogTheme">@style/MwmTheme.AlertDialog</item>
|
||||
<item name="windowBackgroundForced">@color/bg_window</item>
|
||||
<item name="cardBackground">@color/bg_cards</item>
|
||||
<item name="titleDialogTheme">@color/white_primary</item>
|
||||
|
||||
@@ -973,5 +973,4 @@
|
||||
<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_summary_none">Not set</string>
|
||||
<string name="download_resources_custom_url_error_scheme">Please enter a URL starting with http:// or https://</string>
|
||||
<string name="unable_to_delete_list">The app cannot work without at least one list. Do you want to remove it and create a new one?</string>
|
||||
</resources>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<item name="android:textColorPrimary">@color/text_dark</item>
|
||||
<item name="android:textColorPrimaryInverse">@color/text_light</item>
|
||||
<item name="android:textColorSecondary">@color/text_dark_subtitle</item>
|
||||
<item name="android:windowBackground">?appBackground</item>
|
||||
<item name="android:windowBackground">?windowBackgroundForced</item>
|
||||
<item name="android:colorPrimaryDark">@color/bg_primary_dark</item>
|
||||
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
|
||||
<item name="android:fontFamily">@string/robotoRegular</item>
|
||||
@@ -20,7 +20,7 @@
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="clickableBackground">?selectableItemBackground</item>
|
||||
<item name="android:statusBarColor">?colorPrimary</item>
|
||||
<item name="alertDialogTheme">@style/MwmTheme.M3.AlertDialog</item>
|
||||
<item name="alertDialogTheme">@style/MwmTheme.AlertDialog</item>
|
||||
<item name="windowBackgroundForced">@color/bg_window</item>
|
||||
<item name="cardBackground">@color/bg_cards</item>
|
||||
<item name="titleDialogTheme">@color/black_primary</item>
|
||||
@@ -185,11 +185,11 @@
|
||||
</style>
|
||||
|
||||
<style name="MwmTheme.CardBg">
|
||||
<item name="android:windowBackground">?appBackground</item>
|
||||
<item name="android:windowBackground">@color/bg_cards</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmTheme.WindowBg">
|
||||
<item name="android:windowBackground">?appBackground</item>
|
||||
<item name="android:windowBackground">@color/bg_window</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmTheme.AlertDialog" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
@@ -243,7 +243,7 @@
|
||||
|
||||
<style name="MwmTheme.FullScreenDialog">
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
<item name="android:windowBackground">?appBackground</item>
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="MwmTheme.MaterialTimePicker" parent="ThemeOverlay.MaterialComponents.TimePicker">
|
||||
@@ -281,11 +281,4 @@
|
||||
<style name="PopupMenu" parent="ThemeOverlay.Material3">
|
||||
<item name="android:popupBackground">?windowBackgroundForced</item>
|
||||
</style>
|
||||
<!-- Theme required to apply M3 dialog style on preference screen -->
|
||||
<style name="MwmTheme.M3.AlertDialog" parent="ThemeOverlay.Material3.MaterialAlertDialog">
|
||||
<item name="dialogCornerRadius">28dp</item>
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="android:colorBackground">?attr/colorSurfaceContainerHigh</item>
|
||||
<item name="android:layout">@layout/m3_alert_dialog</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -1490,6 +1490,12 @@ JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeSet3dMode(JNIEnv
|
||||
g_framework->Set3dMode(allow3d, allow3dBuildings);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeSetCarScreenMode(JNIEnv * env, jclass, jboolean enabled)
|
||||
{
|
||||
if (g_framework)
|
||||
frm()->SetCarScreenMode(static_cast<bool>(enabled));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_Framework_nativeGet3dMode(JNIEnv * env, jclass, jobject result)
|
||||
{
|
||||
bool enabled;
|
||||
|
||||
@@ -280,6 +280,8 @@ public class Framework
|
||||
|
||||
public static native void nativeSet3dMode(boolean allow3d, boolean allow3dBuildings);
|
||||
|
||||
public static native void nativeSetCarScreenMode(boolean enabled);
|
||||
|
||||
public static native boolean nativeGetAutoZoomEnabled();
|
||||
|
||||
public static native void nativeSetAutoZoomEnabled(boolean enabled);
|
||||
|
||||
@@ -449,7 +449,6 @@ area|z13-[landuse=quarry],
|
||||
area|z13-[power=plant],
|
||||
area|z13-[power=substation],
|
||||
area|z13-[power=generator],
|
||||
area|z13-[man_made=wastewater_plant]
|
||||
{fill-opacity: 1; fill-color: @industrial;}
|
||||
|
||||
area|z13-[landuse=construction],
|
||||
|
||||
@@ -592,7 +592,6 @@ area|z15-[landuse=industrial],
|
||||
area|z15-[landuse=construction],
|
||||
area|z15-[landuse=railway],
|
||||
area|z15-[landuse=quarry],
|
||||
area|z15-[man_made=wastewater_plant],
|
||||
node|z15-[landuse=industrial],
|
||||
node|z15-[landuse=construction],
|
||||
node|z15-[landuse=landfill],
|
||||
|
||||
@@ -208,7 +208,6 @@ landuse-industrial # area z13- (also has captio
|
||||
landuse-industrial-mine # area z13- (also has icon z15-, caption(optional) z15-)
|
||||
landuse-quarry # area z13- (also has icon z15-, caption(optional) z15-)
|
||||
landuse-railway # area z13- (also has caption z15-)
|
||||
man_made-wastewater_plant # area z13- (also has caption z15-)
|
||||
man_made-works # area z13- (also has icon z16-, caption(optional) z17-)
|
||||
power-generator # area z13- (also has icon z17-)
|
||||
power-generator-gas # area z13- (also has icon z17-)
|
||||
|
||||
@@ -1374,7 +1374,6 @@ leisure-slipway # icon z17- (also has captio
|
||||
leisure-track # caption z16- (also has line z15-)
|
||||
leisure-track-area # caption z16- (also has area z15-)
|
||||
man_made-petroleum_well # icon z17- (also has caption(optional) z18-)
|
||||
man_made-wastewater_plant # caption z15- (also has area z13-)
|
||||
power-generator # icon z17- (also has area z13-)
|
||||
power-generator-gas # icon z17- (also has area z13-)
|
||||
power-generator-hydro # icon z17- (also has area z13-)
|
||||
|
||||
@@ -208,7 +208,6 @@ landuse-industrial # area z13- (also has captio
|
||||
landuse-industrial-mine # area z13- (also has icon z15-, caption(optional) z15-)
|
||||
landuse-quarry # area z13- (also has icon z15-, caption(optional) z15-)
|
||||
landuse-railway # area z13- (also has caption z15-)
|
||||
man_made-wastewater_plant # area z13- (also has caption z15-)
|
||||
man_made-works # area z13- (also has icon z16-, caption(optional) z17-)
|
||||
power-generator # area z13- (also has icon z17-)
|
||||
power-generator-gas # area z13- (also has icon z17-)
|
||||
|
||||
@@ -1377,7 +1377,6 @@ leisure-slipway # icon z17- (also has captio
|
||||
leisure-track # caption z16- (also has line z15-)
|
||||
leisure-track-area # caption z16- (also has area z15-)
|
||||
man_made-petroleum_well # icon z14- (also has caption(optional) z18-)
|
||||
man_made-wastewater_plant # caption z15- (also has area z13-)
|
||||
power-generator # icon z17- (also has area z13-)
|
||||
power-generator-gas # icon z17- (also has area z13-)
|
||||
power-generator-hydro # icon z17- (also has area z13-)
|
||||
|
||||
@@ -310,7 +310,6 @@ area|z15-[landuse=quarry],
|
||||
area|z15-[power=plant],
|
||||
area|z15-[power=substation],
|
||||
area|z15-[power=generator],
|
||||
area|z15-[man_made=wastewater_plant],
|
||||
{fill-opacity: 1; fill-color: @industrial;}
|
||||
|
||||
area|z15-[landuse=construction],
|
||||
|
||||
@@ -110,7 +110,6 @@ landuse-industrial-mine # area z15-
|
||||
landuse-landfill # area z15- (also has caption z15-)
|
||||
landuse-quarry # area z15- (also has caption z15-)
|
||||
landuse-railway # area z15- (also has caption z15-)
|
||||
man_made-wastewater_plant # area z15-
|
||||
man_made-works # area z15-
|
||||
power-generator # area z15-
|
||||
power-generator-gas # area z15-
|
||||
|
||||
@@ -111,21 +111,6 @@ sudo apk add \
|
||||
sqlite-dev
|
||||
```
|
||||
|
||||
#### Void
|
||||
|
||||
```bash
|
||||
xbps-install -S \
|
||||
wget \
|
||||
optipng \
|
||||
cmake \
|
||||
ninja \
|
||||
qt6-base-devel \
|
||||
qt6-svg-devel \
|
||||
qt6-position-devel \
|
||||
python3-pip
|
||||
pip3 install "protobuf<3.21" --break-system-packages
|
||||
```
|
||||
|
||||
#### macOS
|
||||
|
||||
```bash
|
||||
|
||||
@@ -59,6 +59,7 @@ NS_SWIFT_NAME(FrameworkHelper)
|
||||
+ (void)updatePlacePageData;
|
||||
+ (void)updateAfterDeleteBookmark;
|
||||
+ (int)currentZoomLevel;
|
||||
+ (void)setCarScreenMode:(BOOL)enabled;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -241,4 +241,8 @@
|
||||
return [[ElevationProfileData alloc] initWithElevationInfo:GetFramework().GetTrackRecordingElevationInfo()];
|
||||
}
|
||||
|
||||
+ (void)setCarScreenMode:(BOOL)enabled {
|
||||
GetFramework().SetCarScreenMode(enabled);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -62,6 +62,8 @@ final class CarPlayService: NSObject {
|
||||
toWindow: window,
|
||||
isCarplayActivated: true
|
||||
)
|
||||
|
||||
FrameworkHelper.setCarScreenMode(true)
|
||||
}
|
||||
|
||||
private var savedInterfaceController: CPInterfaceController?
|
||||
@@ -126,6 +128,7 @@ final class CarPlayService: NSObject {
|
||||
isCarplayActivated: false
|
||||
)
|
||||
}
|
||||
FrameworkHelper.setCarScreenMode(false)
|
||||
}
|
||||
|
||||
@objc func destroy() {
|
||||
|
||||
@@ -58,15 +58,15 @@ public:
|
||||
// Should match codes in the array below.
|
||||
static int8_t constexpr kEnglishCode = 1;
|
||||
static int8_t constexpr kUnsupportedLocaleCode = -1;
|
||||
static int8_t constexpr kSimplifiedChineseCode = 45;
|
||||
static int8_t constexpr kTraditionalChineseCode = 46;
|
||||
static int8_t constexpr kSimplifiedChineseCode = 44;
|
||||
static int8_t constexpr kTraditionalChineseCode = 45;
|
||||
// *NOTE* These constants should be updated when adding new
|
||||
// translation to categories.txt. When editing, keep in mind to check
|
||||
// CategoriesHolder::MapLocaleToInteger() and
|
||||
// CategoriesHolder::MapIntegerToLocale() as their implementations
|
||||
// strongly depend on the contents of the variable.
|
||||
// TODO: Refactor for more flexibility and to avoid breaking rules in two methods mentioned above.
|
||||
static std::array<CategoriesHolder::Mapping, 46> constexpr kLocaleMapping = {{
|
||||
static std::array<CategoriesHolder::Mapping, 45> constexpr kLocaleMapping = {{
|
||||
{"en", kEnglishCode},
|
||||
{"en-AU", 2},
|
||||
{"en-GB", 3},
|
||||
@@ -93,24 +93,23 @@ public:
|
||||
{"it", 24},
|
||||
{"ja", 25},
|
||||
{"ko", 26},
|
||||
{"lt", 27},
|
||||
{"lv", 28},
|
||||
{"mr", 29},
|
||||
{"nb", 30},
|
||||
{"nl", 31},
|
||||
{"pl", 32},
|
||||
{"pt", 33},
|
||||
{"pt-BR", 34},
|
||||
{"ro", 35},
|
||||
{"ru", 36},
|
||||
{"sk", 37},
|
||||
{"sr", 38},
|
||||
{"sv", 39},
|
||||
{"sw", 40},
|
||||
{"th", 41},
|
||||
{"tr", 42},
|
||||
{"uk", 43},
|
||||
{"vi", 44},
|
||||
{"lv", 27},
|
||||
{"mr", 28},
|
||||
{"nb", 29},
|
||||
{"nl", 30},
|
||||
{"pl", 31},
|
||||
{"pt", 32},
|
||||
{"pt-BR", 33},
|
||||
{"ro", 34},
|
||||
{"ru", 35},
|
||||
{"sk", 36},
|
||||
{"sr", 37},
|
||||
{"sv", 38},
|
||||
{"sw", 39},
|
||||
{"th", 40},
|
||||
{"tr", 41},
|
||||
{"uk", 42},
|
||||
{"vi", 43},
|
||||
{"zh-Hans", kSimplifiedChineseCode},
|
||||
{"zh-Hant", kTraditionalChineseCode},
|
||||
}};
|
||||
|
||||
@@ -175,6 +175,16 @@ void Framework::OnLocationUpdate(GpsInfo const & info)
|
||||
#endif
|
||||
|
||||
m_routingManager.OnLocationUpdate(rInfo);
|
||||
|
||||
bool const isRoutingActive = m_routingManager.IsRoutingActive();
|
||||
|
||||
if (m_wasRoutingActive != isRoutingActive)
|
||||
{
|
||||
m_wasRoutingActive = isRoutingActive;
|
||||
|
||||
/// State changed (Started OR Stopped) -> Refresh 3D Buildings
|
||||
Refresh3dMode();
|
||||
}
|
||||
}
|
||||
|
||||
void Framework::OnCompassUpdate(CompassInfo const & info)
|
||||
@@ -2424,6 +2434,10 @@ void Framework::Allow3dMode(bool allow3d, bool allow3dBuildings)
|
||||
if (!m_powerManager.IsFacilityEnabled(power_management::Facility::Buildings3d))
|
||||
allow3dBuildings = false;
|
||||
|
||||
/// If we are in CarPlay/AA mode and Navigation is active, force 3D buildings off.
|
||||
if (m_isCarScreenMode && m_routingManager.IsRoutingActive())
|
||||
allow3dBuildings = false;
|
||||
|
||||
m_drapeEngine->Allow3dMode(allow3d, allow3dBuildings);
|
||||
}
|
||||
|
||||
@@ -3224,6 +3238,7 @@ void Framework::OnRouteFollow(routing::RouterType type)
|
||||
// GetRoutingSettings(type).m_matchRoute to the FollowRoute() instead of |isPedestrianRoute|.
|
||||
// |isArrowGlued| parameter fully corresponds to |m_matchRoute| in RoutingSettings.
|
||||
m_drapeEngine->FollowRoute(scale, scale3d, enableAutoZoom, !isPedestrianRoute /* isArrowGlued */);
|
||||
Refresh3dMode();
|
||||
}
|
||||
|
||||
// RoutingManager::Delegate
|
||||
@@ -3292,3 +3307,25 @@ void Framework::OnPowerSchemeChanged(power_management::Scheme const actualScheme
|
||||
if (actualScheme == power_management::Scheme::EconomyMaximum && GetTrafficManager().IsEnabled())
|
||||
GetTrafficManager().SetEnabled(false);
|
||||
}
|
||||
|
||||
void Framework::SetCarScreenMode(bool enabled)
|
||||
{
|
||||
if (m_isCarScreenMode == enabled)
|
||||
return;
|
||||
|
||||
m_isCarScreenMode = enabled;
|
||||
|
||||
bool allow3d, allow3dBuildings;
|
||||
Load3dMode(allow3d, allow3dBuildings);
|
||||
Allow3dMode(allow3d, allow3dBuildings);
|
||||
}
|
||||
|
||||
void Framework::Refresh3dMode()
|
||||
{
|
||||
bool allow3d = true;
|
||||
bool allow3dBuildings = true;
|
||||
|
||||
/// Load User Preferences and apply logic
|
||||
Load3dMode(allow3d, allow3dBuildings);
|
||||
Allow3dMode(allow3d, allow3dBuildings);
|
||||
}
|
||||
|
||||
@@ -769,4 +769,13 @@ public:
|
||||
// PowerManager::Subscriber override.
|
||||
void OnPowerFacilityChanged(power_management::Facility const facility, bool enabled) override;
|
||||
void OnPowerSchemeChanged(power_management::Scheme const actualScheme) override;
|
||||
|
||||
public:
|
||||
/// Call this from iOS/Android when CarPlay/AA session starts/ends
|
||||
void SetCarScreenMode(bool enabled);
|
||||
bool m_isCarScreenMode = false;
|
||||
|
||||
private:
|
||||
void Refresh3dMode();
|
||||
bool m_wasRoutingActive = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user