capacitor-extended-dialog 0.0.4 → 0.0.6
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,8 +297,9 @@ 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
|
-
com.google.android.material.R.
|
|
300
|
+
MaterialButton cancelBtn = new MaterialButton(
|
|
301
|
+
new ContextThemeWrapper(ctx, com.google.android.material.R.style.Widget_Material3_Button_TextButton),
|
|
302
|
+
null, 0);
|
|
302
303
|
cancelBtn.setText(cancelButton);
|
|
303
304
|
cancelBtn.setOnClickListener((v) -> {
|
|
304
305
|
handleCancel();
|
|
@@ -316,8 +317,9 @@ public class FullScreenDialogFragment extends DialogFragment {
|
|
|
316
317
|
}
|
|
317
318
|
|
|
318
319
|
// OK button
|
|
319
|
-
okBtn = new MaterialButton(
|
|
320
|
-
com.google.android.material.R.
|
|
320
|
+
okBtn = new MaterialButton(
|
|
321
|
+
new ContextThemeWrapper(ctx, com.google.android.material.R.style.Widget_Material3_Button_TextButton),
|
|
322
|
+
null, 0);
|
|
321
323
|
okBtn.setText(okButton);
|
|
322
324
|
okBtn.setOnClickListener((v) -> {
|
|
323
325
|
handleConfirm(type);
|
|
@@ -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);
|
|
@@ -250,8 +251,9 @@ public class SheetBottomDialogFragment extends BottomSheetDialogFragment {
|
|
|
250
251
|
buttonContainer.addView(confirmBtn);
|
|
251
252
|
|
|
252
253
|
// Cancel button
|
|
253
|
-
MaterialButton cancelBtn = new MaterialButton(
|
|
254
|
-
com.google.android.material.R.
|
|
254
|
+
MaterialButton cancelBtn = new MaterialButton(
|
|
255
|
+
new ContextThemeWrapper(ctx, com.google.android.material.R.style.Widget_Material3_Button_TextButton),
|
|
256
|
+
null, 0);
|
|
255
257
|
cancelBtn.setText(cancelButton);
|
|
256
258
|
cancelBtn.setOnClickListener(v -> {
|
|
257
259
|
handleCancel();
|
|
@@ -363,6 +365,10 @@ public class SheetBottomDialogFragment extends BottomSheetDialogFragment {
|
|
|
363
365
|
if (styleOptions.getMessageFontSize() != null) {
|
|
364
366
|
rowValue.setTextSize(TypedValue.COMPLEX_UNIT_SP, styleOptions.getMessageFontSize());
|
|
365
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);
|
|
366
372
|
rowLayout.addView(rowValue);
|
|
367
373
|
}
|
|
368
374
|
|
package/package.json
CHANGED