nit icon indicating copy to clipboard operation
nit copied to clipboard

Calculator example on Android: font size problem

Open ghost opened this issue 6 years ago • 2 comments

Running 'scientific14.apk' on my Moto-G the letters on the buttons and the input/result line don't fit the available size. It looks like they might narrowly fit the space but are aligned wrongly in the available space. The letters in the input/result line are cutoff at the top while the button letters/numbers are missing their bottom part.

ghost avatar Oct 22 '17 21:10 ghost

You are welcome to tweak the font size values to find what fits on your device and PR the new values. I would like the API 14 variant to work (and look decent) on as many devices as possible.

xymus avatar Nov 07 '17 19:11 xymus

simply commenting out .setTextSize calls works well on my Moto G device. Looking at stackoverflow I do not see any general simple and good solution.

Either there could be a user preference or text size needs to be tested against available space and adjusted at runtime.

Given that this problem may hit many apps the interface to the GUI toolkit should probably have this logic builtin.

BTW I really like how simple it is to create (mostly) portable interfaces:)

ghost avatar Nov 09 '17 13:11 ghost