mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
Foregrond of buttons inside dialogs are not updated on creating a css style targetting both Button and Page Button
This commit is contained in:
@ -39,6 +39,20 @@ function showDialog(builder: android.app.AlertDialog.Builder) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var backgroundColor = dialogsCommon.getButtonColor();
|
||||||
|
if (backgroundColor) {
|
||||||
|
let buttons : android.widget.Button[] = [];
|
||||||
|
for (var i = 0; i < 3; i++) {
|
||||||
|
var id = dlg.getContext().getResources().getIdentifier("android:id/button" + i, null, null);
|
||||||
|
buttons[i] = <android.widget.Button>dlg.findViewById(id);
|
||||||
|
}
|
||||||
|
buttons.forEach(button => {
|
||||||
|
if (button) {
|
||||||
|
button.setTextColor(backgroundColor.android);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addButtonsToAlertDialog(alert: android.app.AlertDialog.Builder, options: dialogs.ConfirmOptions,
|
function addButtonsToAlertDialog(alert: android.app.AlertDialog.Builder, options: dialogs.ConfirmOptions,
|
||||||
|
Reference in New Issue
Block a user