chvp / NanoLedger

Ledger (plain text accounting) data entry app for Android
MIT License
35 stars 3 forks source link

Tweak posting row item widths to make currency a bit wider #62

Closed Ajnasz closed 6 months ago

Ajnasz commented 6 months ago

On a Nothing Phone 1, on the Add transaction screen the currency were not visible because the left and right paddings added too much empty space to the text field and it just scrolled out from the view.

Removed the the padding from the currency field as the it is already aligend to the center. The padding is not needed, the spacing will be evenly distributed before and after the text.

Uploaded the fixed version to my phone, opened the "Add transaction" action. My predefined currency were visible and no scrolling were needed anymore.

chvp commented 6 months ago

Thanks for your pull request! I did a lot of fiddling with the widths and padding to try to make it work on smaller screens, but evidently not enough. Could you post some before/after screenshots? I'll test it out on my device as well (probably on the weekend), but my screen is pretty big...

I fear that fully removing the end padding when the currency field is the last field won't look great. (One thing I tried, but couldn't figure out was removing/reducing the inner padding of the text fields, because that's actually where a lot of horizontal space is lost.)

Ajnasz commented 6 months ago

Hi!

My first assumption about the issue was wrong, as the problem is not the padding, instead the fact that I was using a 3 char long currency, which couldn't fit into the field. You can see the issue in the emulator too if you set a longer currency in the settings.

I added another change to fix that. It looks like the weight was misused. From the documentation I've found the values are ratios and not percentage of the available space. According to that I changed the weights, so the currency field will be a bit wider and the 3 character currency will fit too.

Here are screenshots from my phone:

wrong1:

wrong2:

good currency before amount:

good currency after amount: