← 输入框|github.com|刷新
Skip to content

fix(android): create prompt and login inputs from the dialog context - #11582

Open
NathanWalker wants to merge 1 commit into
mainfrom
fix/android-dialog-themed-inputs
Open

NathanWalker wants to merge 1 commit into
mainfrom
fix/android-dialog-themed-inputs

Conversation

@NathanWalker

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

On Android, prompt() creates its EditText from the current activity, and login() creates both EditTexts and their LinearLayout from the application context. Neither uses the context of the AlertDialog.Builder that the theme option is applied to, so a dialog themed through options.theme (or the app's dialog theme) renders its inputs with a different style. The application context also carries no theme at all (#11068).

What is the new behavior?

The inputs and the login layout are created from alert.getContext(), which is the builder's themed context, so they follow the same theme as the dialog. Apps whose login() inputs relied on the unthemed application-context look will now see them styled like the rest of the dialog, which is the intent of the theme option.

The new spec ui/dialogs/index.android.spec.ts checks the context each view is constructed with, for both prompt and login. It fails without the fix. The full core suite passes (553 tests).

Closes #11068.

@nx-cloud

nx-cloud Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit ae2255d

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 11s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-10-23 20:44:39 UTC

@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11582
npm i https://pkg.pr.new/@nativescript/vite@11582
npm i https://pkg.pr.new/@nativescript/webpack@11582

commit: ae2255d

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create inputs in core/ui/dialogs/index.android.js with AlertDialog context

1 participant