Skip to content

fix: Custom study menu may look crowded or cluttered when not all items are on a single line each#19108

Merged
david-allison merged 1 commit intoankidroid:mainfrom
snowtimeglass:custom-study-menu-padding
Sep 6, 2025
Merged

fix: Custom study menu may look crowded or cluttered when not all items are on a single line each#19108
david-allison merged 1 commit intoankidroid:mainfrom
snowtimeglass:custom-study-menu-padding

Conversation

@snowtimeglass
Copy link
Contributor

@snowtimeglass snowtimeglass commented Aug 18, 2025

Purpose / Description

In translating into other languages, each item in Custom study menu may need more than one line, but the current layout (suitable for single-line items) doesn't give the items a sufficient and consistent padding.
image
(German)

This PR intends to add the sufficient and consistent padding between the items even in such case.

Fixes

Approach

  • Use a new layout file which specifies a paddingVertical value instead of the current layout

  • Other than that, use the same values as in the current layout file (simple_list_item_1.xml) below:

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
   android:id="@android:id/text1"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:textAppearance="?android:attr/textAppearanceListItemSmall"
   android:gravity="center_vertical"
   android:paddingStart="?android:attr/listPreferredItemPaddingStart"
   android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
   android:minHeight="?android:attr/listPreferredItemHeightSmall" />

How Has This Been Tested?

Checked in a physical device (Android 11)

Before / After
(In German)
image


(Original)
image

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

Copy link
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

In what type of device was the first image produced? I fired up an emulator(and also looked on a phone), and there's enough space between the items IMO:

screen_one

@snowtimeglass
Copy link
Contributor Author

In what type of device was the first image produced?

It was done in the following device:

AnkiDroid Version = 2.22.0beta2 (01328a9fc8e15c75f5cb98a5268d9ba04ca51353)  
Backend Version = 0.1.59-anki25.07.3 (25.07.3 65b5aefd0705463cb12e72e254f798f90c96e815)  
Android Version = 11 (SDK 30)  
ProductFlavor = full  
Device Info = OPPO | OPPO | OP4BAFL1 | CPH2013 | CPH2013 | qcom  
Webview User Agent = Mozilla/5.0 (Linux; Android 11; CPH2013 Build/RKQ1.200903.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.157 Mobile Safari/537.36  
ACRA UUID = dae56c60-345e-41f3-a616-f02ce05cd8ad  
FSRS = 4.1.1 (Enabled: false)  
Crash Reports Enabled = true

@lukstbit

This comment was marked as outdated.

@snowtimeglass snowtimeglass marked this pull request as draft September 6, 2025 05:52
@snowtimeglass snowtimeglass marked this pull request as ready for review September 6, 2025 08:30
Co-authored-by: lukstbit <52494258+lukstbit@users.noreply.github.com>

Each item in Custom study menu may need more than one line,
but the current layout (suitable for single-line items) doesn't give the items a sufficient and consistent padding.

This PR intends to add the sufficient and consistent padding between the items even if each of the items has more than one line.
@snowtimeglass snowtimeglass force-pushed the custom-study-menu-padding branch from 230f142 to 48c75a5 Compare September 6, 2025 09:26
Copy link
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

LGTM

@lukstbit lukstbit added the Needs Second Approval Has one approval, one more approval to merge label Sep 6, 2025
@david-allison david-allison added this pull request to the merge queue Sep 6, 2025
@david-allison david-allison mentioned this pull request Sep 6, 2025
5 tasks
Merged via the queue into ankidroid:main with commit 3646217 Sep 6, 2025
10 checks passed
@github-actions github-actions bot added this to the 2.23 release milestone Sep 6, 2025
@github-actions github-actions bot removed the Needs Second Approval Has one approval, one more approval to merge label Sep 6, 2025
@snowtimeglass snowtimeglass deleted the custom-study-menu-padding branch September 7, 2025 00:18
@david-allison
Copy link
Member

Hi there @snowtimeglass! This is the OpenCollective Notice for PRs merged from 2025-09-01 through 2025-09-30

If you are interested in compensation for this work, the process with details is here: https://github.com/ankidroid/Anki-Android/wiki/OpenCollective-Payment-Process#how-to-get-paid

We only post one comment per person per month to avoid spamming you, regardless of the number of PRs merged, but this note applies to all PRs merged for this month

Please understand that our monthly budget is never guaranteed to cover all claims - the cap on payments-per-person may be lower, but we try to make our process as fair and transparent as possible, we just need your understanding.

Thanks!

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.

Custom study menu may look crowded or cluttered when not all items are on a single line each

3 participants