Enhance dialog buttons (#633)

switch to outline buttons

Enhance and fix color scheme for dialogs

Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/633
This commit is contained in:
M M Arif 2020-08-06 17:17:27 +02:00
parent 12a7b6040b
commit 24064192e4
2 changed files with 23 additions and 5 deletions

View File

@ -327,7 +327,7 @@ public class RepoInfoFragment extends Fragment {
alertDialog.setTitle(getResources().getString(R.string.infoMoreInformation));
alertDialog.setView(view);
alertDialog.setPositiveButton(getResources().getString(R.string.close), (dialog, which) -> dialog.dismiss());
alertDialog.setNeutralButton(getResources().getString(R.string.close), null);
alertDialog.create().show();
});

View File

@ -87,32 +87,50 @@
<item name="android:textColorHint">@color/colorWhite</item>
</style>
<style name="AppThemeConfirmDialog" parent="Theme.AppCompat.Dialog.Alert">
<style name="AppThemeConfirmDialog" parent="Theme.MaterialComponents.Dialog.Alert">
<item name="android:background">@color/colorPrimary</item>
<item name="android:textColorPrimary">@color/colorWhite</item>
<item name="android:textColor">@color/colorWhite</item>
<item name="colorControlNormal">@color/colorWhite</item>
<item name="colorControlActivated">@color/darkGreen</item>
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
<item name="buttonBarNeutralButtonStyle">@style/NeutralButtonStyle</item>
<item name="android:windowBackground">@drawable/shape_round_corners</item>
</style>
<style name="AppThemeLightConfirmDialog" parent="Theme.AppCompat.Light.Dialog.Alert">
<style name="AppThemeLightConfirmDialog" parent="Theme.MaterialComponents.Light.Dialog.Alert">
<item name="android:background">@color/colorWhite</item>
<item name="android:textColorPrimary">@color/lightThemeTextColor</item>
<item name="android:textColor">@color/lightThemeTextColor</item>
<item name="colorControlNormal">@color/lightThemeTextColor</item>
<item name="colorControlActivated">@color/darkGreen</item>
<item name="buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
<item name="buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
<item name="buttonBarNeutralButtonStyle">@style/NeutralButtonStyle</item>
<item name="android:windowBackground">@drawable/shape_round_corners</item>
</style>
<style name="AppThemePopupMenuStyle" parent="Widget.AppCompat.PopupMenu">
<style name="NegativeButtonStyle" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="android:textColor">@color/darkGreen</item>
</style>
<style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="android:textColor">@color/darkRed</item>
</style>
<style name="NeutralButtonStyle" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="android:textColor">@color/darkGreen</item>
</style>
<style name="AppThemePopupMenuStyle" parent="Widget.MaterialComponents.PopupMenu">
<item name="android:popupBackground">@color/colorPrimary</item>
<item name="android:textColor">@color/colorWhite</item>
<item name="android:layout_marginStart">3dp</item>
<item name="android:layout_marginEnd">3dp</item>
</style>
<style name="AppThemeLightPopupMenuStyle" parent="Widget.AppCompat.Light.PopupMenu">
<style name="AppThemeLightPopupMenuStyle" parent="Widget.MaterialComponents.PopupMenu">
<item name="android:popupBackground">@color/colorWhite</item>
<item name="android:itemBackground">@color/lightThemeBackground</item>
<item name="android:textColor">@color/lightThemeTextColor</item>