Consistent dialog styles.

This commit is contained in:
Anton Chekulaev 2020-08-24 14:43:24 +10:00
parent fd52fdd042
commit 9cb0a18a85
12 changed files with 51 additions and 27 deletions

View File

@ -5,7 +5,9 @@
<solid android:color="?attr/dialog_background_color" />
<corners android:topLeftRadius="24dp" android:topRightRadius="24dp" />
<corners
android:topLeftRadius="@dimen/dialog_corner_radius"
android:topRightRadius="@dimen/dialog_corner_radius" />
<stroke android:width="@dimen/border_thickness" android:color="@color/dialog_border" />
<!-- <stroke android:width="@dimen/border_thickness" android:color="@color/dialog_border" />-->
</shape>

View File

@ -7,5 +7,5 @@
<corners android:radius="@dimen/dialog_corner_radius" />
<stroke android:width="@dimen/border_thickness" android:color="@color/dialog_border" />
<!-- <stroke android:width="@dimen/border_thickness" android:color="@color/dialog_border" />-->
</shape>

View File

@ -0,0 +1,5 @@
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,14c1.66,0 2.99,-1.34 2.99,-3L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6c0,1.66 1.34,3 3,3zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11L5,11c0,3.41 2.72,6.23 6,6.72L11,21h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z"/>
</vector>

View File

@ -0,0 +1,6 @@
<vector android:height="48dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path android:fillColor="@android:color/white" android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
</vector>

View File

@ -3,5 +3,5 @@
<solid android:color="@color/compose_view_background"/>
<corners android:radius="12dp"/>
<corners android:radius="@dimen/dialog_corner_radius"/>
</shape>

View File

@ -15,13 +15,14 @@
<item name="android:navigationBarColor">@color/gray78</item>
<item name="theme_type">light</item>
<item name="actionBarTabBarStyle">@style/TextSecure.LightActionBar.TabBar</item>
<item name="colorPrimary">@color/action_bar_background</item>
<item name="colorPrimaryDark">@color/action_bar_background</item>
<item name="colorAccent">@color/accent</item>
<item name="colorControlActivated">@color/accent</item>
<item name="colorControlNormal">@color/text</item>
<item name="colorControlHighlight">@color/accent</item>
<!-- <item name="actionBarTabBarStyle">@style/TextSecure.LightActionBar.TabBar</item>-->
<!-- <item name="colorPrimary">@color/action_bar_background</item>-->
<!-- <item name="colorPrimaryDark">@color/action_bar_background</item>-->
<!-- <item name="colorAccent">@color/accent</item>-->
<!-- <item name="colorControlActivated">@color/accent</item>-->
<!-- <item name="colorControlNormal">@color/text</item>-->
<!-- <item name="colorControlHighlight">@color/accent</item>-->
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyleLight</item>
<item name="android:alertDialogTheme">@style/AppCompatDialogStyleLight</item>
<item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.Light.BottomSheetDialog</item>

View File

@ -30,7 +30,7 @@
<dimen name="fake_chat_view_bubble_corner_radius">10dp</dimen>
<dimen name="fake_chat_view_height">234dp</dimen>
<dimen name="setting_button_height">56dp</dimen>
<dimen name="dialog_corner_radius">8dp</dimen>
<dimen name="dialog_corner_radius">12dp</dimen>
<dimen name="dialog_button_corner_radius">4dp</dimen>
<dimen name="pn_option_corner_radius">8dp</dimen>
<dimen name="path_status_view_size">8dp</dimen>

View File

@ -7,6 +7,9 @@
<item name="colorPrimary">@color/action_bar_background</item>
<item name="colorPrimaryDark">@color/action_bar_background</item>
<item name="colorAccent">@color/accent</item>
<item name="colorControlNormal">?android:textColorPrimary</item>
<item name="colorControlActivated">?colorAccent</item>
<item name="colorControlHighlight">?colorAccent</item>
<item name="android:textColorPrimary">@color/text</item>
<item name="android:textColorSecondary">?android:textColorPrimary</item>
<item name="android:textColorTertiary">@color/unimportant</item>
@ -24,9 +27,9 @@
<item name="statusBarBackground">@color/accent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="titleTextColor">?android:textColorPrimary</item>
<item name="colorControlNormal">?android:textColorPrimary</item>
<item name="appBarLayoutStyle">@style/Widget.Design.AppBarLayout</item>
<item name="windowActionModeOverlay">true</item>
<item name="actionModeCloseDrawable">@drawable/ic_baseline_clear_24</item>
<item name="actionModeBackground">@color/compose_view_background</item>
@ -106,7 +109,7 @@
<item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
<item name="colorPrimary">@color/action_bar_background</item>
<item name="colorPrimaryDark">@color/action_bar_background</item>
<item name="colorAccent">@color/signal_primary_dark</item>
<!-- <item name="colorAccent">@color/signal_primary_dark</item>-->
<item name="android:navigationBarColor">@color/compose_view_background</item>
<item name="recipient_preference_blocked">#d00000</item>
@ -382,12 +385,12 @@
<!-- <item name="actionBarPopupTheme">@style/ThemeOverlay.AppCompat.DayNight</item>-->
<!-- <item name="actionModeBackground">@color/compose_view_background</item>-->
<!-- <item name="actionModeCloseDrawable">@drawable/ic_close_white_24dp</item>-->
<item name="android:textColor">@color/text_color_dark_theme</item>
<item name="android:textColorSecondary">@color/text_color_secondary_dark_theme</item>
<item name="colorAccent">@color/accent</item>
<item name="colorControlActivated">@color/accent</item>
<item name="colorControlNormal">@color/text</item>
<item name="colorControlHighlight">@color/accent</item>
<!-- <item name="android:textColor">@color/text_color_dark_theme</item>-->
<!-- <item name="android:textColorSecondary">@color/text_color_secondary_dark_theme</item>-->
<!-- <item name="colorAccent">@color/accent</item>-->
<!-- <item name="colorControlActivated">@color/accent</item>-->
<!-- <item name="colorControlNormal">@color/text</item>-->
<!-- <item name="colorControlHighlight">@color/accent</item>-->
<!-- <item name="alertDialogTheme">@style/Session.AlertDialog</item>-->
<!-- <item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.BottomSheetDialog</item>-->
<item name="android:navigationBarColor">@color/compose_view_background</item>
@ -544,12 +547,14 @@
<item name="shared_contact_item_button_color">@color/core_grey_85</item>
</style>
<style name="RationaleDialog" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:windowBackground">@drawable/permission_rationale_dialog_corners</item>
<style name="RationaleDialog" parent="Theme.AppCompat.DayNight.Dialog.Alert">
<!-- <item name="android:windowBackground">@drawable/permission_rationale_dialog_corners</item>-->
<item name="android:windowBackground">@drawable/default_dialog_background</item>
</style>
<style name="TextSecure.MediaSendProgressDialog" parent="@android:style/Theme.Dialog">
<item name="android:background">@color/dialog_background</item>
<!-- <item name="android:background">@color/dialog_background</item>-->
<item name="android:background">@drawable/default_dialog_background</item>
<item name="android:windowNoTitle">true</item>
</style>

View File

@ -2535,7 +2535,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
Permissions.with(this)
.request(Manifest.permission.RECORD_AUDIO)
.ifNecessary()
.withRationaleDialog(getString(R.string.ConversationActivity_to_send_audio_messages_allow_signal_access_to_your_microphone), R.drawable.ic_mic_white_48dp)
.withRationaleDialog(getString(R.string.ConversationActivity_to_send_audio_messages_allow_signal_access_to_your_microphone), R.drawable.ic_baseline_mic_48)
.withPermanentDenialDialog(getString(R.string.ConversationActivity_signal_requires_the_microphone_permission_in_order_to_send_audio_messages))
.execute();
}
@ -2736,7 +2736,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
Permissions.with(ConversationActivity.this)
.request(Manifest.permission.CAMERA)
.ifNecessary()
.withRationaleDialog(getString(R.string.ConversationActivity_to_capture_photos_and_video_allow_signal_access_to_the_camera), R.drawable.ic_photo_camera_white_48dp)
.withRationaleDialog(getString(R.string.ConversationActivity_to_capture_photos_and_video_allow_signal_access_to_the_camera), R.drawable.ic_baseline_photo_camera_48)
.withPermanentDenialDialog(getString(R.string.ConversationActivity_signal_needs_the_camera_permission_to_take_photos_or_video))
.onAllGranted(() -> {
composeText.clearFocus();

View File

@ -376,7 +376,7 @@ public class MediaSendActivity extends PassphraseRequiredActionBarActivity imple
Permissions.with(this)
.request(Manifest.permission.CAMERA)
.ifNecessary()
.withRationaleDialog(getString(R.string.ConversationActivity_to_capture_photos_and_video_allow_signal_access_to_the_camera), R.drawable.ic_photo_camera_white_48dp)
.withRationaleDialog(getString(R.string.ConversationActivity_to_capture_photos_and_video_allow_signal_access_to_the_camera), R.drawable.ic_baseline_photo_camera_48)
.withPermanentDenialDialog(getString(R.string.ConversationActivity_signal_needs_the_camera_permission_to_take_photos_or_video))
.onAllGranted(() -> {
Camera1Fragment fragment = getOrCreateCameraFragment();

View File

@ -56,7 +56,7 @@ public class WelcomeActivity extends BaseActionBarActivity {
Permissions.with(this)
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE)
.ifNecessary()
.withRationaleDialog(getString(R.string.activity_landing_permission_dialog_message), R.drawable.ic_folder_white_48dp)
.withRationaleDialog(getString(R.string.activity_landing_permission_dialog_message), R.drawable.ic_baseline_folder_48)
.onAnyResult(() -> {
Intent nextIntent = getIntent().getParcelableExtra("next_intent");