mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-26 20:55:10 +00:00
Apply Material3 spec to dialogs.
This commit is contained in:
committed by
Greyson Parrelli
parent
56a2b27745
commit
bf156ad7d2
@@ -23,9 +23,8 @@ class CustomExpireTimerSelectDialog : DialogFragment() {
|
||||
val dialogView: View = LayoutInflater.from(context).inflate(R.layout.custom_expire_timer_select_dialog, null, false)
|
||||
selector = dialogView.findViewById(R.id.custom_expire_timer_select_dialog_selector)
|
||||
|
||||
val builder = MaterialAlertDialogBuilder(requireContext(), R.style.Signal_ThemeOverlay_Dialog_Rounded)
|
||||
|
||||
return builder.setTitle(R.string.ExpireTimerSettingsFragment__custom_time)
|
||||
return MaterialAlertDialogBuilder(requireContext())
|
||||
.setTitle(R.string.ExpireTimerSettingsFragment__custom_time)
|
||||
.setView(dialogView)
|
||||
.setPositiveButton(R.string.ExpireTimerSettingsFragment__set) { _, _ ->
|
||||
viewModel.select(selector.getTimer())
|
||||
|
||||
@@ -1941,7 +1941,7 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
||||
public void onInMemoryMessageClicked(@NonNull InMemoryMessageRecord messageRecord) {
|
||||
if (messageRecord instanceof InMemoryMessageRecord.NoGroupsInCommon) {
|
||||
boolean isGroup = ((InMemoryMessageRecord.NoGroupsInCommon) messageRecord).isGroup();
|
||||
new MaterialAlertDialogBuilder(requireContext(), R.style.Signal_ThemeOverlay_Dialog_Rounded)
|
||||
new MaterialAlertDialogBuilder(requireContext(), R.style.ThemeOverlay_Signal_MaterialAlertDialog)
|
||||
.setMessage(isGroup ? R.string.GroupsInCommonMessageRequest__none_of_your_contacts_or_people_you_chat_with_are_in_this_group
|
||||
: R.string.GroupsInCommonMessageRequest__you_have_no_groups_in_common_with_this_person)
|
||||
.setNeutralButton(R.string.GroupsInCommonMessageRequest__about_message_requests, (d, w) -> CommunicationActions.openBrowserLink(requireContext(), getString(R.string.GroupsInCommonMessageRequest__support_article)))
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class EnableCallNotificationSettingsDialog extends DialogFragment {
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
MaterialAlertDialogBuilder dialogBuilder = new MaterialAlertDialogBuilder(requireContext(), R.style.Signal_ThemeOverlay_Dialog_Rounded);
|
||||
MaterialAlertDialogBuilder dialogBuilder = new MaterialAlertDialogBuilder(requireContext(), R.style.ThemeOverlay_Signal_MaterialAlertDialog);
|
||||
|
||||
Runnable action = null;
|
||||
switch (getCallNotificationSettingsBitmask(requireContext())) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public final class OldDeviceTransferLockedDialog extends DialogFragment {
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
MaterialAlertDialogBuilder dialogBuilder = new MaterialAlertDialogBuilder(requireContext(), R.style.Signal_ThemeOverlay_Dialog_Rounded);
|
||||
MaterialAlertDialogBuilder dialogBuilder = new MaterialAlertDialogBuilder(requireContext(), R.style.ThemeOverlay_Signal_MaterialAlertDialog);
|
||||
dialogBuilder.setView(R.layout.old_device_transfer_locked_dialog_fragment)
|
||||
.setPositiveButton(R.string.OldDeviceTransferLockedDialog__done, (d, w) -> OldDeviceExitActivity.exit(requireActivity()))
|
||||
.setNegativeButton(R.string.OldDeviceTransferLockedDialog__cancel_and_activate_this_device, (d, w) -> onUnlockRequest());
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class GroupDescriptionDialog extends DialogFragment {
|
||||
descriptionText = dialogView.findViewById(R.id.group_description_dialog_text);
|
||||
descriptionText.setMovementMethod(LongClickMovementMethod.getInstance(requireContext()));
|
||||
|
||||
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireContext(), R.style.Signal_ThemeOverlay_Dialog_Rounded);
|
||||
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireContext(), R.style.ThemeOverlay_Signal_MaterialAlertDialog);
|
||||
Dialog dialog = builder.setTitle(TextUtils.isEmpty(argumentTitle) ? getString(R.string.GroupDescriptionDialog__group_description) : argumentTitle)
|
||||
.setView(dialogView)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
|
||||
@@ -25,6 +25,8 @@ import androidx.autofill.HintConstants;
|
||||
import androidx.core.app.DialogCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.contactshare.SimpleTextWatcher;
|
||||
@@ -32,7 +34,6 @@ import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.lock.v2.CreateKbsPinActivity;
|
||||
import org.thoughtcrime.securesms.lock.v2.KbsConstants;
|
||||
import org.thoughtcrime.securesms.util.ServiceUtil;
|
||||
import org.thoughtcrime.securesms.util.ThemeUtil;
|
||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||
|
||||
import java.util.Objects;
|
||||
@@ -48,7 +49,7 @@ public final class SignalPinReminderDialog {
|
||||
|
||||
Log.i(TAG, "Showing PIN reminder dialog.");
|
||||
|
||||
AlertDialog dialog = new AlertDialog.Builder(context, ThemeUtil.isDarkTheme(context) ? R.style.Theme_Signal_AlertDialog_Dark_Cornered_ColoredAccent : R.style.Theme_Signal_AlertDialog_Light_Cornered_ColoredAccent)
|
||||
AlertDialog dialog = new MaterialAlertDialogBuilder(context, R.style.ThemeOverlay_Signal_MaterialAlertDialog_Wide)
|
||||
.setView(R.layout.kbs_pin_reminder_view)
|
||||
.setCancelable(false)
|
||||
.setOnCancelListener(d -> RegistrationLockReminders.scheduleReminder(context, false))
|
||||
|
||||
@@ -27,7 +27,7 @@ object StoryDialogs {
|
||||
onAddToStory()
|
||||
} else {
|
||||
SignalStore.storyValues().userHasBeenNotifiedAboutStories = true
|
||||
MaterialAlertDialogBuilder(context, R.style.Signal_ThemeOverlay_Dialog_Rounded)
|
||||
MaterialAlertDialogBuilder(context, R.style.ThemeOverlay_Signal_MaterialAlertDialog)
|
||||
.setTitle(R.string.StoryDialogs__add_to_story_q)
|
||||
.setMessage(R.string.StoryDialogs__adding_content)
|
||||
.setPositiveButton(R.string.StoryDialogs__add_to_story) { _, _ ->
|
||||
|
||||
@@ -276,7 +276,7 @@ class StoriesLandingFragment : DSLSettingsFragment(layoutId = R.layout.stories_l
|
||||
}
|
||||
|
||||
private fun handleHideStory(model: StoriesLandingItem.Model) {
|
||||
MaterialAlertDialogBuilder(requireContext(), R.style.Signal_ThemeOverlay_Dialog_Rounded)
|
||||
MaterialAlertDialogBuilder(requireContext(), R.style.ThemeOverlay_Signal_MaterialAlertDialog)
|
||||
.setTitle(R.string.StoriesLandingFragment__hide_story)
|
||||
.setMessage(getString(R.string.StoriesLandingFragment__new_story_updates, model.data.storyRecipient.getShortDisplayName(requireContext())))
|
||||
.setPositiveButton(R.string.StoriesLandingFragment__hide) { _, _ ->
|
||||
|
||||
Reference in New Issue
Block a user