Skip to content

Improve the "Rename note type" dialog#20471

Closed
dagangtj wants to merge 1 commit intoankidroid:mainfrom
dagangtj:improve-rename-notetype-dialog
Closed

Improve the "Rename note type" dialog#20471
dagangtj wants to merge 1 commit intoankidroid:mainfrom
dagangtj:improve-rename-notetype-dialog

Conversation

@dagangtj
Copy link

Fixes #20467

Changes

  • ✅ Add "Name" hint to the text input field border
  • ✅ Show red error text when note type already exists
  • ✅ Error message: "Note type already exists"
  • ✅ Clear error when input becomes valid

Implementation Details

  • Added android:hint="@string/name" to TextInputLayout
  • Added new string resources: name and note_type_already_exists
  • Modified callback to set/clear error on TextInputLayout
  • Error only shows when duplicate name is entered

Testing

  • Entering an existing note type name shows red error text
  • Changing to a unique name clears the error
  • Button remains disabled when duplicate name is present

- Add "Name" hint to the text input field
- Show red error text when note type already exists
- Error message: "Note type already exists"
- Clear error when input becomes valid

Fixes ankidroid#20467
@welcome
Copy link

welcome bot commented Mar 14, 2026

First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.

@github-actions
Copy link
Contributor

Important

Maintainers: This PR contains Strings changes

  1. Sync Translations before merging this PR and wait for the action to complete
  2. Review and merge the auto-generated PR in order to sync all user-submitted translations
  3. Sync Translations again and merge the PR so the huge automated string changes caused by merging this PR are by themselves and easy to review

@david-allison
Copy link
Member

@lukstbit
Copy link
Member

Hi @dagangtj, are you aware of: https://github.com/ankidroid/Anki-Android/blob/main/AI_POLICY.md

Most likely not.
Closing for this and that the user ignored the request to leave the PR for another dev.

@lukstbit lukstbit closed this Mar 15, 2026
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.

Improve the "Rename note type" dialog

3 participants