mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-02 19:13:44 +00:00
Compare commits
1 Commits
jb_alert_d
...
jb_err_msg
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ba0c14ce5 |
@@ -446,7 +446,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
default -> throw new AssertionError("Unexpected result code = " + result);
|
default -> throw new AssertionError("Unexpected result code = " + result);
|
||||||
};
|
};
|
||||||
|
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(titleId)
|
.setTitle(titleId)
|
||||||
.setMessage(messageId)
|
.setMessage(messageId)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
dismissLocationErrorDialog();
|
dismissLocationErrorDialog();
|
||||||
mLocationErrorDialog = new MaterialAlertDialogBuilder(MwmActivity.this)
|
mLocationErrorDialog = new MaterialAlertDialogBuilder(MwmActivity.this, R.style.MwmTheme_AlertDialog)
|
||||||
.setMessage(R.string.unknown_current_position)
|
.setMessage(R.string.unknown_current_position)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -655,7 +655,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.message_invalid_feature_position)
|
.setTitle(R.string.message_invalid_feature_position)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||||
@@ -1155,7 +1155,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
if (type == IsolinesState.EXPIREDDATA)
|
if (type == IsolinesState.EXPIREDDATA)
|
||||||
{
|
{
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_update_maps)
|
.setTitle(R.string.downloader_update_maps)
|
||||||
.setMessage(R.string.isolines_activation_error_dialog)
|
.setMessage(R.string.isolines_activation_error_dialog)
|
||||||
.setPositiveButton(
|
.setPositiveButton(
|
||||||
@@ -1774,7 +1774,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog =
|
mAlertDialog =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.unable_to_calc_alert_title)
|
.setTitle(R.string.unable_to_calc_alert_title)
|
||||||
.setMessage(R.string.unable_to_calc_alert_subtitle)
|
.setMessage(R.string.unable_to_calc_alert_subtitle)
|
||||||
.setPositiveButton(R.string.settings,
|
.setPositiveButton(R.string.settings,
|
||||||
@@ -1797,7 +1797,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
builder.append(getString(resId)).append("\n\n");
|
builder.append(getString(resId)).append("\n\n");
|
||||||
|
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.dialog_routing_disclaimer_title)
|
.setTitle(R.string.dialog_routing_disclaimer_title)
|
||||||
.setMessage(builder.toString())
|
.setMessage(builder.toString())
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
@@ -1846,7 +1846,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
final MapObject endPoint = Objects.requireNonNull(controller.getEndPoint());
|
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)
|
.setTitle(R.string.p2p_only_from_current)
|
||||||
.setMessage(R.string.p2p_reroute_from_current)
|
.setMessage(R.string.p2p_reroute_from_current)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
@@ -2040,7 +2040,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
mPreciseLocationDialogShown = true;
|
mPreciseLocationDialogShown = true;
|
||||||
final MaterialAlertDialogBuilder builder =
|
final MaterialAlertDialogBuilder builder =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle("⚠ " + getString(R.string.limited_accuracy))
|
.setTitle("⚠ " + getString(R.string.limited_accuracy))
|
||||||
.setMessage(R.string.precise_location_is_disabled_long_text)
|
.setMessage(R.string.precise_location_is_disabled_long_text)
|
||||||
.setNegativeButton(R.string.close, (dialog, which) -> dialog.dismiss())
|
.setNegativeButton(R.string.close, (dialog, which) -> dialog.dismiss())
|
||||||
@@ -2074,7 +2074,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mLocationErrorDialog = new MaterialAlertDialogBuilder(this)
|
mLocationErrorDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.enable_location_services)
|
.setTitle(R.string.enable_location_services)
|
||||||
.setMessage(R.string.location_is_disabled_long_text)
|
.setMessage(R.string.location_is_disabled_long_text)
|
||||||
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
||||||
@@ -2167,7 +2167,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this)
|
final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.enable_location_services)
|
.setTitle(R.string.enable_location_services)
|
||||||
.setMessage(R.string.location_is_disabled_long_text)
|
.setMessage(R.string.location_is_disabled_long_text)
|
||||||
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
.setOnDismissListener(dialog -> mLocationErrorDialog = null)
|
||||||
@@ -2253,7 +2253,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
final MaterialAlertDialogBuilder builder =
|
final MaterialAlertDialogBuilder builder =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.current_location_unknown_error_title)
|
.setTitle(R.string.current_location_unknown_error_title)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setMessage(R.string.power_save_dialog_summary)
|
.setMessage(R.string.power_save_dialog_summary)
|
||||||
@@ -2278,7 +2278,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog =
|
mAlertDialog =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.load_kmz_title)
|
.setTitle(R.string.load_kmz_title)
|
||||||
.setMessage(getString(R.string.unknown_file_type, uri))
|
.setMessage(getString(R.string.unknown_file_type, uri))
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -2295,7 +2295,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog =
|
mAlertDialog =
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.load_kmz_title)
|
.setTitle(R.string.load_kmz_title)
|
||||||
.setMessage(getString(R.string.failed_to_open_file, uri, error))
|
.setMessage(getString(R.string.failed_to_open_file, uri, error))
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -2317,7 +2317,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
public void onBookmarksFileImportFailed()
|
public void onBookmarksFileImportFailed()
|
||||||
{
|
{
|
||||||
dismissAlertDialog();
|
dismissAlertDialog();
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(this)
|
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.load_kmz_title)
|
.setTitle(R.string.load_kmz_title)
|
||||||
.setMessage(R.string.load_kmz_failed)
|
.setMessage(R.string.load_kmz_failed)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -2578,7 +2578,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||||||
|
|
||||||
private void reportUnsupported()
|
private void reportUnsupported()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setMessage(R.string.unsupported_phone)
|
.setMessage(R.string.unsupported_phone)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setPositiveButton(R.string.close, (dlg, which) -> this.moveTaskToBack(true))
|
.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)
|
private void showFatalErrorDialog(@StringRes int titleId, @StringRes int messageId, Exception error)
|
||||||
{
|
{
|
||||||
mCanceled = true;
|
mCanceled = true;
|
||||||
new MaterialAlertDialogBuilder(this)
|
new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(titleId)
|
.setTitle(titleId)
|
||||||
.setMessage(messageId)
|
.setMessage(messageId)
|
||||||
.setPositiveButton(
|
.setPositiveButton(
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import app.organicmaps.sdk.bookmarks.data.BookmarkCategory;
|
|||||||
import app.organicmaps.sdk.bookmarks.data.BookmarkManager;
|
import app.organicmaps.sdk.bookmarks.data.BookmarkManager;
|
||||||
import app.organicmaps.util.InputUtils;
|
import app.organicmaps.util.InputUtils;
|
||||||
import app.organicmaps.util.Utils;
|
import app.organicmaps.util.Utils;
|
||||||
|
import com.google.android.material.button.MaterialButton;
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
import com.google.android.material.imageview.ShapeableImageView;
|
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -38,7 +38,7 @@ public class BookmarkCategorySettingsFragment extends BaseMwmToolbarFragment
|
|||||||
@NonNull
|
@NonNull
|
||||||
private TextInputEditText mEditCategoryNameView;
|
private TextInputEditText mEditCategoryNameView;
|
||||||
@NonNull
|
@NonNull
|
||||||
private ShapeableImageView mSaveView;
|
private MaterialButton mSaveView;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState)
|
public void onCreate(@Nullable Bundle savedInstanceState)
|
||||||
@@ -75,7 +75,19 @@ public class BookmarkCategorySettingsFragment extends BaseMwmToolbarFragment
|
|||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2)
|
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2)
|
||||||
{
|
{
|
||||||
clearNameBtn.setEndIconVisible(charSequence.length() > 0);
|
if (charSequence.length() > 0)
|
||||||
|
{
|
||||||
|
clearNameBtn.setEndIconVisible(true);
|
||||||
|
mSaveView.setEnabled(true);
|
||||||
|
mSaveView.setAlpha(1f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clearNameBtn.setEndIconVisible(false);
|
||||||
|
mSaveView.setEnabled(false);
|
||||||
|
mSaveView.setAlpha(0.5f);
|
||||||
|
clearNameBtn.setError(getString(R.string.bookmarks_error_title_empty_list_name));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -111,16 +123,6 @@ public class BookmarkCategorySettingsFragment extends BaseMwmToolbarFragment
|
|||||||
|
|
||||||
private boolean validateCategoryName(@Nullable String name)
|
private boolean validateCategoryName(@Nullable String name)
|
||||||
{
|
{
|
||||||
if (TextUtils.isEmpty(name))
|
|
||||||
{
|
|
||||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
|
||||||
.setTitle(R.string.bookmarks_error_title_empty_list_name)
|
|
||||||
.setMessage(R.string.bookmarks_error_message_empty_list_name)
|
|
||||||
.setPositiveButton(R.string.ok, null)
|
|
||||||
.show();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (BookmarkManager.INSTANCE.isUsedCategoryName(name) && !TextUtils.equals(name, mCategory.getName()))
|
if (BookmarkManager.INSTANCE.isUsedCategoryName(name) && !TextUtils.equals(name, mCategory.getName()))
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
|
|||||||
@@ -60,14 +60,14 @@ public enum BookmarksSharingHelper
|
|||||||
case BookmarkSharingResult.SUCCESS ->
|
case BookmarkSharingResult.SUCCESS ->
|
||||||
SharingUtils.shareBookmarkFile(context, launcher, result.getSharingPath(), result.getMimeType());
|
SharingUtils.shareBookmarkFile(context, launcher, result.getSharingPath(), result.getMimeType());
|
||||||
case BookmarkSharingResult.EMPTY_CATEGORY ->
|
case BookmarkSharingResult.EMPTY_CATEGORY ->
|
||||||
new MaterialAlertDialogBuilder(context)
|
new MaterialAlertDialogBuilder(context, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.bookmarks_error_title_share_empty)
|
.setTitle(R.string.bookmarks_error_title_share_empty)
|
||||||
.setMessage(R.string.bookmarks_error_message_share_empty)
|
.setMessage(R.string.bookmarks_error_message_share_empty)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.show();
|
.show();
|
||||||
case BookmarkSharingResult.ARCHIVE_ERROR, BookmarkSharingResult.FILE_ERROR ->
|
case BookmarkSharingResult.ARCHIVE_ERROR, BookmarkSharingResult.FILE_ERROR ->
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(context)
|
new MaterialAlertDialogBuilder(context, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.dialog_routing_system_error)
|
.setTitle(R.string.dialog_routing_system_error)
|
||||||
.setMessage(R.string.bookmarks_error_message_share_general)
|
.setMessage(R.string.bookmarks_error_message_share_general)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public final class CustomMapServerDialog
|
|||||||
edit.setText(current);
|
edit.setText(current);
|
||||||
|
|
||||||
MaterialAlertDialogBuilder builder =
|
MaterialAlertDialogBuilder builder =
|
||||||
new MaterialAlertDialogBuilder(context)
|
new MaterialAlertDialogBuilder(context, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.download_resources_custom_url_title)
|
.setTitle(R.string.download_resources_custom_url_title)
|
||||||
.setMessage(R.string.download_resources_custom_url_message)
|
.setMessage(R.string.download_resources_custom_url_message)
|
||||||
.setView(dialogView)
|
.setView(dialogView)
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment
|
|||||||
negativeButtonText = args.getString(ARG_NEGATIVE_BUTTON);
|
negativeButtonText = args.getString(ARG_NEGATIVE_BUTTON);
|
||||||
}
|
}
|
||||||
|
|
||||||
AlertDialog editTextDialog = new MaterialAlertDialogBuilder(requireActivity())
|
AlertDialog editTextDialog = new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setView(buildView())
|
.setView(buildView())
|
||||||
.setNegativeButton(negativeButtonText, null)
|
.setNegativeButton(negativeButtonText, null)
|
||||||
.setPositiveButton(positiveButtonText, null)
|
.setPositiveButton(positiveButtonText, null)
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
|||||||
{
|
{
|
||||||
if (RoutingController.get().isNavigating())
|
if (RoutingController.get().isNavigating())
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(adapter.mActivity)
|
new MaterialAlertDialogBuilder(adapter.mActivity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_delete_map)
|
.setTitle(R.string.downloader_delete_map)
|
||||||
.setMessage(R.string.downloader_delete_map_while_routing_dialog)
|
.setMessage(R.string.downloader_delete_map_while_routing_dialog)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
@@ -133,7 +133,7 @@ class DownloaderAdapter extends RecyclerView.Adapter<DownloaderAdapter.ViewHolde
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
new MaterialAlertDialogBuilder(adapter.mActivity)
|
new MaterialAlertDialogBuilder(adapter.mActivity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_delete_map)
|
.setTitle(R.string.downloader_delete_map)
|
||||||
.setMessage(R.string.downloader_delete_map_dialog)
|
.setMessage(R.string.downloader_delete_map_dialog)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class MapManagerHelper
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final AlertDialog dlg = new MaterialAlertDialogBuilder(activity)
|
final AlertDialog dlg = new MaterialAlertDialogBuilder(activity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.country_status_download_failed)
|
.setTitle(R.string.country_status_download_failed)
|
||||||
.setMessage(getErrorCodeStrRes(errorData.errorCode))
|
.setMessage(getErrorCodeStrRes(errorData.errorCode))
|
||||||
.setNegativeButton(R.string.cancel,
|
.setNegativeButton(R.string.cancel,
|
||||||
@@ -72,7 +72,7 @@ public class MapManagerHelper
|
|||||||
|
|
||||||
private static void notifyNoSpaceInternal(Activity activity)
|
private static void notifyNoSpaceInternal(Activity activity)
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(activity)
|
new MaterialAlertDialogBuilder(activity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_no_space_title)
|
.setTitle(R.string.downloader_no_space_title)
|
||||||
.setMessage(R.string.downloader_no_space_message)
|
.setMessage(R.string.downloader_no_space_message)
|
||||||
.setPositiveButton(android.R.string.ok, null)
|
.setPositiveButton(android.R.string.ok, null)
|
||||||
@@ -123,7 +123,7 @@ public class MapManagerHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
new MaterialAlertDialogBuilder(activity)
|
new MaterialAlertDialogBuilder(activity, R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.download_over_mobile_header)
|
.setTitle(R.string.download_over_mobile_header)
|
||||||
.setMessage(R.string.download_over_mobile_message)
|
.setMessage(R.string.download_over_mobile_message)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.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)
|
.setTitle(R.string.editor_socket)
|
||||||
.setView(dialogView)
|
.setView(dialogView)
|
||||||
.setPositiveButton(R.string.save,
|
.setPositiveButton(R.string.save,
|
||||||
@@ -997,7 +997,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
message = R.string.editor_reset_edits_message;
|
message = R.string.editor_reset_edits_message;
|
||||||
}
|
}
|
||||||
|
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(message)
|
.setTitle(message)
|
||||||
.setPositiveButton(title,
|
.setPositiveButton(title,
|
||||||
(dialog, which) -> {
|
(dialog, which) -> {
|
||||||
@@ -1020,7 +1020,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
|
|
||||||
private void placeDisused()
|
private void placeDisused()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_mark_business_vacant_title)
|
.setTitle(R.string.editor_mark_business_vacant_title)
|
||||||
.setMessage(R.string.editor_mark_business_vacant_description)
|
.setMessage(R.string.editor_mark_business_vacant_description)
|
||||||
.setPositiveButton(R.string.editor_submit, (dlg, which) -> {
|
.setPositiveButton(R.string.editor_submit, (dlg, which) -> {
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ public class EditorHostFragment
|
|||||||
|
|
||||||
private void processNoFeatures()
|
private void processNoFeatures()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloader_no_space_title)
|
.setTitle(R.string.downloader_no_space_title)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.show();
|
.show();
|
||||||
@@ -386,7 +386,7 @@ public class EditorHostFragment
|
|||||||
|
|
||||||
private void showNoobDialog()
|
private void showNoobDialog()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_share_to_all_dialog_title)
|
.setTitle(R.string.editor_share_to_all_dialog_title)
|
||||||
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
||||||
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ public class FeatureCategoryFragment
|
|||||||
// Duplicate of showNoobDialog()
|
// Duplicate of showNoobDialog()
|
||||||
private void showNoteConfirmationDialog(double lat, double lon, String noteText)
|
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)
|
.setTitle(R.string.editor_share_to_all_dialog_title)
|
||||||
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
.setMessage(getString(R.string.editor_share_to_all_dialog_message_1) + " "
|
||||||
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
+ getString(R.string.editor_share_to_all_dialog_message_2))
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class OsmLoginFragment extends BaseMwmToolbarFragment
|
|||||||
|
|
||||||
private void onAuthFail()
|
private void onAuthFail()
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.editor_login_error_dialog)
|
.setTitle(R.string.editor_login_error_dialog)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
.show();
|
.show();
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class FaqFragment extends BaseMwmFragment
|
|||||||
FloatingActionButton feedbackFab = root.findViewById(R.id.feedback_fab);
|
FloatingActionButton feedbackFab = root.findViewById(R.id.feedback_fab);
|
||||||
feedbackFab.setOnClickListener(
|
feedbackFab.setOnClickListener(
|
||||||
v
|
v
|
||||||
-> new MaterialAlertDialogBuilder(requireActivity())
|
-> new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.feedback)
|
.setTitle(R.string.feedback)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
.setItems(new CharSequence[] {getString(R.string.feedback_general), getString(R.string.report_a_bug)},
|
.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())
|
if (mDialog != null && mDialog.isShowing())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mDialog = new MaterialAlertDialogBuilder(mActivity)
|
mDialog = new MaterialAlertDialogBuilder(mActivity, R.style.MwmTheme_AlertDialog)
|
||||||
.setMessage(R.string.common_check_internet_connection_dialog)
|
.setMessage(R.string.common_check_internet_connection_dialog)
|
||||||
.setPositiveButton(R.string.ok, (dialog, which) -> TrafficManager.INSTANCE.setEnabled(false))
|
.setPositiveButton(R.string.ok, (dialog, which) -> TrafficManager.INSTANCE.setEnabled(false))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ abstract class BaseRoutingErrorDialogFragment extends BaseMwmDialogFragment
|
|||||||
public Dialog onCreateDialog(Bundle savedInstanceState)
|
public Dialog onCreateDialog(Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
parseArguments();
|
parseArguments();
|
||||||
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireActivity())
|
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setNegativeButton(android.R.string.cancel, null);
|
.setNegativeButton(android.R.string.cancel, null);
|
||||||
beforeDialogCreated(builder);
|
beforeDialogCreated(builder);
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ public class SettingsPrefsFragment extends BaseXmlSettingsFragment implements La
|
|||||||
pref.setOnPreferenceClickListener(preference -> {
|
pref.setOnPreferenceClickListener(preference -> {
|
||||||
if (MapManager.nativeIsDownloading())
|
if (MapManager.nativeIsDownloading())
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.downloading_is_active)
|
.setTitle(R.string.downloading_is_active)
|
||||||
.setMessage(R.string.cant_change_this_setting)
|
.setMessage(R.string.cant_change_this_setting)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class StoragePathFragment extends BaseSettingsFragment
|
|||||||
final String oldPath = storages.get(currentIndex).mPath;
|
final String oldPath = storages.get(currentIndex).mPath;
|
||||||
final String newPath = storages.get(newIndex).mPath;
|
final String newPath = storages.get(newIndex).mPath;
|
||||||
|
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setTitle(R.string.move_maps)
|
.setTitle(R.string.move_maps)
|
||||||
.setPositiveButton(R.string.ok, (dlg, which) -> moveStorage(newPath, oldPath))
|
.setPositiveButton(R.string.ok, (dlg, which) -> moveStorage(newPath, oldPath))
|
||||||
@@ -133,7 +133,7 @@ public class StoragePathFragment extends BaseSettingsFragment
|
|||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
new MaterialAlertDialogBuilder(requireActivity())
|
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(R.string.move_maps_error)
|
.setTitle(R.string.move_maps_error)
|
||||||
.setPositiveButton(
|
.setPositiveButton(
|
||||||
R.string.report_a_bug,
|
R.string.report_a_bug,
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class BookmarkColorDialogFragment extends BaseMwmDialogFragment
|
|||||||
mIconResId = getArguments().getInt(ICON_RES);
|
mIconResId = getArguments().getInt(ICON_RES);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new MaterialAlertDialogBuilder(requireActivity())
|
return new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||||
.setView(buildView())
|
.setView(buildView())
|
||||||
.setTitle(R.string.choose_color)
|
.setTitle(R.string.choose_color)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
|||||||
@@ -464,7 +464,7 @@ public class PlacePageController
|
|||||||
mAlertDialog.show();
|
mAlertDialog.show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mAlertDialog = new MaterialAlertDialogBuilder(requireContext())
|
mAlertDialog = new MaterialAlertDialogBuilder(requireContext(), R.style.MwmTheme_AlertDialog)
|
||||||
.setTitle(requireContext().getString(R.string.delete_track_dialog_title, mMapObject.getTitle()))
|
.setTitle(requireContext().getString(R.string.delete_track_dialog_title, mMapObject.getTitle()))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
|
|||||||
@@ -12,13 +12,18 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:theme="@style/MwmWidget.ToolbarTheme">
|
android:theme="@style/MwmWidget.ToolbarTheme">
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/save"
|
android:id="@+id/save"
|
||||||
android:layout_width="?actionBarSize"
|
style="@style/Widget.Material3.Button.IconButton"
|
||||||
|
android:layout_width="?actionBarSize"
|
||||||
android:layout_height="?actionBarSize"
|
android:layout_height="?actionBarSize"
|
||||||
android:scaleType="centerInside"
|
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
app:srcCompat="@drawable/ic_done"/>
|
app:icon="@drawable/ic_done"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:iconTint="?iconTint"
|
||||||
|
android:enabled="false"
|
||||||
|
app:iconPadding="0dp"
|
||||||
|
app:iconSize="24dp" />
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?colorSurfaceContainerHigh"
|
android:background="?cardBackground"
|
||||||
android:minHeight="@dimen/height_item_oneline"
|
android:minHeight="@dimen/height_item_oneline"
|
||||||
android:paddingStart="@dimen/margin_base_plus"
|
android:paddingStart="@dimen/margin_base_plus"
|
||||||
android:paddingEnd="@dimen/margin_base_plus">
|
android:paddingEnd="@dimen/margin_base_plus">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?colorSurfaceContainerHigh"
|
android:background="?cardBackground"
|
||||||
android:minHeight="@dimen/height_item_oneline"
|
android:minHeight="@dimen/height_item_oneline"
|
||||||
android:paddingStart="@dimen/margin_base_plus"
|
android:paddingStart="@dimen/margin_base_plus"
|
||||||
android:paddingEnd="@dimen/margin_base_plus">
|
android:paddingEnd="@dimen/margin_base_plus">
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<item name="android:statusBarColor">?colorPrimary</item>
|
<item name="android:statusBarColor">?colorPrimary</item>
|
||||||
<item name="android:windowTranslucentNavigation">false</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="windowBackgroundForced">@color/bg_window</item>
|
||||||
<item name="cardBackground">@color/bg_cards</item>
|
<item name="cardBackground">@color/bg_cards</item>
|
||||||
<item name="titleDialogTheme">@color/white_primary</item>
|
<item name="titleDialogTheme">@color/white_primary</item>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<item name="android:windowActionBarOverlay">true</item>
|
<item name="android:windowActionBarOverlay">true</item>
|
||||||
<item name="clickableBackground">?selectableItemBackground</item>
|
<item name="clickableBackground">?selectableItemBackground</item>
|
||||||
<item name="android:statusBarColor">?colorPrimary</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="windowBackgroundForced">@color/bg_window</item>
|
||||||
<item name="cardBackground">@color/bg_cards</item>
|
<item name="cardBackground">@color/bg_cards</item>
|
||||||
<item name="titleDialogTheme">@color/black_primary</item>
|
<item name="titleDialogTheme">@color/black_primary</item>
|
||||||
@@ -281,11 +281,4 @@
|
|||||||
<style name="PopupMenu" parent="ThemeOverlay.Material3">
|
<style name="PopupMenu" parent="ThemeOverlay.Material3">
|
||||||
<item name="android:popupBackground">?windowBackgroundForced</item>
|
<item name="android:popupBackground">?windowBackgroundForced</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="MwmTheme.M3.AlertDialog" parent="ThemeOverlay.Material3.MaterialAlertDialog">
|
|
||||||
<item name="dialogCornerRadius">28dp</item>
|
|
||||||
<item name="cornerFamily">rounded</item>
|
|
||||||
<item name="android:colorBackground">?attr/colorSurface</item>
|
|
||||||
<item name="android:layout">@layout/m3_alert_dialog</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user