Repository navigation
ref(feedback): Extend Dialog instead of AlertDialog in SentryUserFeedbackForm - #6338
Open
runningcode wants to merge 4 commits into
Open
runningcode wants to merge 4 commits into
runningcode wants to merge 4 commits into
Conversation
📲 Install BuildsAndroid
|
runningcode
force-pushed
the
no/feedback-form-extend-dialog
branch
2 times, most recently
from
October 22, 2026 12:41
ced4589 to
0eb7685
Compare
runningcode
marked this pull request as ready for review
October 22, 2026 15:21
runningcode
requested review from
0xadam-brown,
adinauer,
markushi and
romtsn
as code owners
October 22, 2026 15:21
romtsn
reviewed
Oct 23, 2026
| protected void onCreate(Bundle savedInstanceState) { | ||
| super.onCreate(savedInstanceState); | ||
| setContentView(R.layout.sentry_dialog_user_feedback); | ||
| final @Nullable Window window = getWindow(); |
Contributor
There was a problem hiding this comment.
this is not needed for Dialog anymore?
…backForm The form never used AlertDialog's title, message, buttons or custom view; it replaces the content with its own layout in onCreate. Dialog falls back to dialogTheme for theme 0, while AlertDialog uses alertDialogTheme, so the form now resolves alertDialogTheme itself to keep the default look unchanged. The FLAG_ALT_FOCUSABLE_IM workaround goes away because only AlertDialog set that flag. Resolves JAVA-494 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runningcode
force-pushed
the
no/feedback-form-extend-dialog
branch
from
October 27, 2026 12:03
4be78a0 to
425a0fe
Compare
runningcode
force-pushed
the
no/feedback-form-extend-dialog
branch
from
October 28, 2026 14:30
425a0fe to
fb8022f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fb8022f. Configure here.
AlertDialog always requested FEATURE_NO_TITLE because it draws its own title. Plain Dialog does not, so themes that don't set windowNoTitle, like Theme.Material.Dialog, added an empty system title bar above the form's own title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📜 Description
SentryUserFeedbackFormnow extendsandroid.app.Dialoginstead ofandroid.app.AlertDialog. The form never usedAlertDialog's title, message, buttons or custom-view slots. It replaced the whole content with its own layout inonCreate.The default theme stays the same. For
themeResId == 0,Dialogfalls back toandroid:dialogTheme, so the form resolvesandroid:alertDialogThemeitself, asAlertDialogdid. The platform'sTheme.Material.Dialogsets no minimum window width, so under it the window stays at the 320dp preferred dialog width. On a 411dp-wide phone that made the form 18% narrower in portrait and about half as wide in landscape.AlertDialogalso always requestedFEATURE_NO_TITLE, because it draws its own title. The form now requests it itself. Otherwise themes that don't setwindowNoTitle, likeTheme.Material.Dialog, add an empty system title bar above the form's own title.This also drops the
FLAG_ALT_FOCUSABLE_IMworkaround from #5359.AlertDialogset that flag because it found no text input in its own content, which hid the soft keyboard.Dialognever sets it. The existing test that checks the flag is absent still passes.💡 Motivation and Context
Changing the superclass breaks binary and source compatibility for anyone calling
AlertDialog-only methods on the form (setButton,setMessage,setView,getButton, ...), so it waits for v9.💚 How did you test it?
./gradlew spotlessApply apiDump./gradlew :sentry-android-core:testReleaseUnitTest :sentry-samples:sentry-samples-android:compileReleaseKotlin :sentry-android-integration-tests:sentry-uitest-android:compileReleaseAndroidTestKotlinAlertDialogversion in portrait and landscape: same window width, noFLAG_ALT_FOCUSABLE_IMon the window, and the keyboard shows when tapping the description field. WithTheme_Material_Dialogpassed to the Builder, no system title bar appears.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
🤖 Generated with Claude Code