capacitor-extended-dialog 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -297,10 +297,10 @@ public class FullScreenDialogFragment extends DialogFragment {
|
|
|
297
297
|
|
|
298
298
|
// Cancel button (not shown for ALERT type)
|
|
299
299
|
if (type != DialogType.ALERT) {
|
|
300
|
-
MaterialButton cancelBtn = new MaterialButton(
|
|
301
|
-
new ContextThemeWrapper(ctx, com.google.android.material.R.style.Widget_Material3_Button_TextButton),
|
|
302
|
-
null, 0);
|
|
300
|
+
MaterialButton cancelBtn = new MaterialButton(ctx, null, com.google.android.material.R.attr.borderlessButtonStyle);
|
|
303
301
|
cancelBtn.setText(cancelButton);
|
|
302
|
+
cancelBtn.setBackgroundTintList(ColorStateList.valueOf(android.graphics.Color.TRANSPARENT));
|
|
303
|
+
cancelBtn.setRippleColor(ColorStateList.valueOf(primaryColorValue & 0x1FFFFFFF));
|
|
304
304
|
cancelBtn.setOnClickListener((v) -> {
|
|
305
305
|
handleCancel();
|
|
306
306
|
dismiss();
|
|
@@ -317,10 +317,10 @@ public class FullScreenDialogFragment extends DialogFragment {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
// OK button
|
|
320
|
-
okBtn = new MaterialButton(
|
|
321
|
-
new ContextThemeWrapper(ctx, com.google.android.material.R.style.Widget_Material3_Button_TextButton),
|
|
322
|
-
null, 0);
|
|
320
|
+
okBtn = new MaterialButton(ctx, null, com.google.android.material.R.attr.borderlessButtonStyle);
|
|
323
321
|
okBtn.setText(okButton);
|
|
322
|
+
okBtn.setBackgroundTintList(ColorStateList.valueOf(android.graphics.Color.TRANSPARENT));
|
|
323
|
+
okBtn.setRippleColor(ColorStateList.valueOf(primaryColorValue & 0x1FFFFFFF));
|
|
324
324
|
okBtn.setOnClickListener((v) -> {
|
|
325
325
|
handleConfirm(type);
|
|
326
326
|
dismiss();
|
|
@@ -237,7 +237,8 @@ public class SheetBottomDialogFragment extends BottomSheetDialogFragment {
|
|
|
237
237
|
} else {
|
|
238
238
|
confirmBtn.setBackgroundTintList(ColorStateList.valueOf(primaryColor));
|
|
239
239
|
}
|
|
240
|
-
|
|
240
|
+
int onPrimaryColor = MaterialColors.getColor(ctx, com.google.android.material.R.attr.colorOnPrimary, 0xFFFFFFFF);
|
|
241
|
+
confirmBtn.setTextColor(ColorStateList.valueOf(onPrimaryColor));
|
|
241
242
|
confirmBtn.setCornerRadius((int) (24 * density));
|
|
242
243
|
confirmBtn.setMinHeight(buttonHeight);
|
|
243
244
|
confirmBtn.setPadding(buttonHorizontalPadding, 0, buttonHorizontalPadding, 0);
|
|
@@ -249,15 +250,15 @@ public class SheetBottomDialogFragment extends BottomSheetDialogFragment {
|
|
|
249
250
|
confirmBtn.setLayoutParams(confirmParams);
|
|
250
251
|
buttonContainer.addView(confirmBtn);
|
|
251
252
|
|
|
252
|
-
// Cancel button
|
|
253
|
-
MaterialButton cancelBtn = new MaterialButton(
|
|
254
|
-
new ContextThemeWrapper(ctx, com.google.android.material.R.style.Widget_Material3_Button_TextButton),
|
|
255
|
-
null, 0);
|
|
253
|
+
// Cancel button (text-only style, no background fill)
|
|
254
|
+
MaterialButton cancelBtn = new MaterialButton(ctx, null, com.google.android.material.R.attr.borderlessButtonStyle);
|
|
256
255
|
cancelBtn.setText(cancelButton);
|
|
257
256
|
cancelBtn.setOnClickListener(v -> {
|
|
258
257
|
handleCancel();
|
|
259
258
|
dismiss();
|
|
260
259
|
});
|
|
260
|
+
cancelBtn.setBackgroundTintList(ColorStateList.valueOf(android.graphics.Color.TRANSPARENT));
|
|
261
|
+
cancelBtn.setRippleColor(ColorStateList.valueOf(MaterialColors.getColor(ctx, com.google.android.material.R.attr.colorPrimary, 0xFF6750A4) & 0x1FFFFFFF));
|
|
261
262
|
if (styleOptions.getCancelButtonColor() != null) {
|
|
262
263
|
cancelBtn.setTextColor(ColorStateList.valueOf(styleOptions.getCancelButtonColor()));
|
|
263
264
|
} else {
|
|
@@ -364,6 +365,10 @@ public class SheetBottomDialogFragment extends BottomSheetDialogFragment {
|
|
|
364
365
|
if (styleOptions.getMessageFontSize() != null) {
|
|
365
366
|
rowValue.setTextSize(TypedValue.COMPLEX_UNIT_SP, styleOptions.getMessageFontSize());
|
|
366
367
|
}
|
|
368
|
+
rowValue.setEllipsize(android.text.TextUtils.TruncateAt.END);
|
|
369
|
+
rowValue.setMaxLines(2);
|
|
370
|
+
LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f);
|
|
371
|
+
rowValue.setLayoutParams(valueParams);
|
|
367
372
|
rowLayout.addView(rowValue);
|
|
368
373
|
}
|
|
369
374
|
|
package/package.json
CHANGED