2828import android .view .LayoutInflater ;
2929import android .view .View ;
3030
31+ import com .google .android .material .button .MaterialButton ;
3132import com .google .android .material .dialog .MaterialAlertDialogBuilder ;
3233import com .nextcloud .client .di .Injectable ;
3334import com .owncloud .android .R ;
@@ -52,8 +53,6 @@ public class RenamePublicShareDialogFragment
5253
5354 private static final String ARG_PUBLIC_SHARE = "PUBLIC_SHARE" ;
5455
55- public static final String RENAME_PUBLIC_SHARE_FRAGMENT = "RENAME_PUBLIC_SHARE_FRAGMENT" ;
56-
5756 @ Inject ViewThemeUtils viewThemeUtils ;
5857 @ Inject KeyboardUtils keyboardUtils ;
5958
@@ -75,8 +74,10 @@ public void onStart() {
7574 AlertDialog alertDialog = (AlertDialog ) getDialog ();
7675
7776 if (alertDialog != null ) {
78- viewThemeUtils .platform .colorTextButtons (alertDialog .getButton (AlertDialog .BUTTON_POSITIVE ),
79- alertDialog .getButton (AlertDialog .BUTTON_NEUTRAL ));
77+ MaterialButton positiveButton = (MaterialButton ) alertDialog .getButton (AlertDialog .BUTTON_POSITIVE );
78+ MaterialButton negativeButton = (MaterialButton ) alertDialog .getButton (AlertDialog .BUTTON_NEGATIVE );
79+ viewThemeUtils .material .colorMaterialButtonPrimaryTonal (positiveButton );
80+ viewThemeUtils .material .colorMaterialButtonPrimaryBorderless (negativeButton );
8081 }
8182 }
8283
@@ -104,7 +105,7 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
104105 MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder (view .getContext ());
105106 builder .setView (view )
106107 .setPositiveButton (R .string .file_rename , this )
107- .setNeutralButton (R .string .common_cancel , this )
108+ .setNegativeButton (R .string .common_cancel , this )
108109 .setTitle (R .string .public_share_name );
109110
110111 viewThemeUtils .dialog .colorMaterialAlertDialogBackground (binding .userInput .getContext (), builder );
0 commit comments