Skip to content

Handled the dialogs when shifted from review to preview and again to …#20526

Closed
22oo1cso56mansoorkhan-cell wants to merge 2 commits intoankidroid:mainfrom
22oo1cso56mansoorkhan-cell:controls
Closed

Handled the dialogs when shifted from review to preview and again to …#20526
22oo1cso56mansoorkhan-cell wants to merge 2 commits intoankidroid:mainfrom
22oo1cso56mansoorkhan-cell:controls

Conversation

@22oo1cso56mansoorkhan-cell
Copy link
Copy Markdown

@22oo1cso56mansoorkhan-cell 22oo1cso56mansoorkhan-cell commented Mar 20, 2026

…the review

Purpose / Description

When adding a gesture/key binding to one of the 4 answer actions, a dialog is supposed to appear to ask the user whether they want the action to also show the answer. When tapping on the "Previews" tab then "Reviews", this dialog doesn't appear.

Fixes

Improve the dialogs in the Controls screen #20504

Approach

setupAnswerCommands() is only called during the initial fragment creation and in onTabSelected(), but it's not being called when switching back to the REVIEWER tab from the PREVIEWER tab.

When you switch from REVIEWER to PREVIEWER, onTabUnselected() removes all preferences after the tab layout. Then when switching back to REVIEWER, onTabSelected() calls addPreferencesFromResource() and setupAnswerCommands(). However, there's a timing issue - the preferences are being recreated but the answer commands setup might not be properly reattached to the new preference instances.

How Has This Been Tested?

java version : java 24
It was tested using physical mobile using wireless debugging

Learning (optional, can help others)

Describe the research stage

Links to blog posts, patterns, libraries or addons used to solve this problem

Control.dialogs.mp4

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@manocormen
Copy link
Copy Markdown
Contributor

Hey, a couple of reminders regarding the gsoc / contributor guidelines:

  • Commit messages should have 50 chars max; it's one of the items you checked in the PR template. I would also shorten the PR title.
  • There shouldn't be merge commits in your history. You may want to rebase.

@22oo1cso56mansoorkhan-cell
Copy link
Copy Markdown
Author

22oo1cso56mansoorkhan-cell commented Mar 20, 2026

Should I make the PR once again??

@manocormen
Copy link
Copy Markdown
Contributor

No, those issues can be taken care of with rebase. I feel the need to add that there's a strict AI usage policy.

@22oo1cso56mansoorkhan-cell
Copy link
Copy Markdown
Author

Yup I have already gone through the AI policy......All the code is generated soley by myself...

@manocormen
Copy link
Copy Markdown
Contributor

Good, although it does seem over-commented to me. A maintainer will assess it. Please, give them some time; they are quite busy. In the meantime, you may want to make the fixes I mentioned.

Copy link
Copy Markdown
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to contain some of the same commits as:

Please unmark this as draft when resolved

@david-allison david-allison marked this pull request as draft March 21, 2026 03:41
@22oo1cso56mansoorkhan-cell 22oo1cso56mansoorkhan-cell marked this pull request as ready for review March 22, 2026 13:16
@Akira2206
Copy link
Copy Markdown
Contributor

Hi, it looks like the merge commit is still there and the title hasn't been updated; you should try using a semantic commit for the title and message.

@david-allison david-allison marked this pull request as draft March 26, 2026 20:13
@22oo1cso56mansoorkhan-cell
Copy link
Copy Markdown
Author

I have done the rebase and force push @david-allison you can review my both prs

@22oo1cso56mansoorkhan-cell 22oo1cso56mansoorkhan-cell marked this pull request as ready for review March 27, 2026 05:46
@22oo1cso56mansoorkhan-cell
Copy link
Copy Markdown
Author

22oo1cso56mansoorkhan-cell commented Mar 27, 2026

#20526 (review)

@david-allison I have resolved the issues by, deleting the the same commit present in #20531 and rebasing , force push...so I kindly request proceed for the merge process for this pr...
Maybe u are super hyper for these messages....bcuz as those rebase,force push concept was used by me first time...so that took me time for learning and to know whats the process behind it

@david-allison
Copy link
Copy Markdown
Member

This is the same subset of code in your other PR.

Closing for the same reason I mentioned in #20531 (comment)

  • The review comment on the above hasn't been fixed, either in this PR, or in the linked PR
  • The two PRs shouldn't have overlapping code without saying that 1 PR is based on another

@22oo1cso56mansoorkhan-cell
Copy link
Copy Markdown
Author

22oo1cso56mansoorkhan-cell commented Mar 27, 2026

@david-allison Maybe I have been overthinking the modifications....Maybe I am still not ready for such huge codebases and their coding traits....But it was a great experience....I have learnt the github to the maximum extent during the process..But still, I will try contributing till the end as per your coding traits and modifications. I wont give up. Because My main aim is not to get in GSOC26 or something (cuz I started late (around 1 month back))...Just I want to do something different than the traditional studies and personal projects. Hope u don't mind this comment.As I am still in 2nd year of my B.E. I will do my best

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants