mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
set the correct application theme while creating the dialog fragment (#6691)
* set the correct application theme while creating the dialog fragment * useing the new approche fusing the new approach for setting the theme only when the modal view is fullscreen(it will break the style when using non-fullscreen modal) * note - get theme change * set the correct application theme while creating the dialog fragment * useing the new approche fusing the new approach for setting the theme only when the modal view is fullscreen(it will break the style when using non-fullscreen modal) * note - get theme change
This commit is contained in:
@@ -135,8 +135,14 @@ function initializeDialogFragment() {
|
||||
this._shownCallback = options.shownCallback;
|
||||
this.owner._dialogFragment = this;
|
||||
this.setStyle(android.support.v4.app.DialogFragment.STYLE_NO_TITLE, 0);
|
||||
|
||||
let theme = this.getTheme();
|
||||
if (this._fullscreen) {
|
||||
// In fullscreen mode, get the application's theme.
|
||||
theme = this.getActivity().getApplicationInfo().theme;
|
||||
}
|
||||
|
||||
const dialog = new DialogImpl(this, this.getActivity(), this.getTheme());
|
||||
const dialog = new DialogImpl(this, this.getActivity(), theme);
|
||||
|
||||
// do not override alignment unless fullscreen modal will be shown;
|
||||
// otherwise we might break component-level layout:
|
||||
|
||||
Reference in New Issue
Block a user