scdev1025 / android-wheel

Automatically exported from code.google.com/p/android-wheel
0 stars 0 forks source link

Wheel width smaller than content #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Create wheel with array addapter
2. Array content ["1","2","3","4","5","60","70","80","900",]
3. if only one digit e.g. 1,2,3 are visible, wheel calculates width for 1 
digit. Then if you scroll to 60,70... you will see only 6,7  

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
2.1 

Please provide any additional information below.
This bug can is also in demo -> Time 2 ->hours column

Original issue reported on code.google.com by martin.v...@gmail.com on 21 Mar 2012 at 2:36

GoogleCodeExporter commented 9 years ago
A workaround for this bug is to pass the new NumericWheelAdapter a C-style 
format string as the third paramter, i.e. "%02d" for a 2 digit decimal number 
with 0 padding.

Original comment by blaz...@gmail.com on 22 Apr 2012 at 6:11

GoogleCodeExporter commented 9 years ago
I had the same problem, fix it changing:
int WheelView at function:
private void buildViewForMeasuring
replace
int addItems = visibleItems / 2;
with
int addItems = viewAdapter.getItemsCount()

Original comment by cjr...@gmail.com on 13 May 2012 at 8:08

GoogleCodeExporter commented 9 years ago
I'm thinking about this issue.
And I think the best approach is to set the wheel width manually or use items 
with the same width, or use the approach from Comment #1.
The fix above (Comment #2) is not so good since there can be a lot of wheel 
items, or items are loaded from somewhere, so there would be performance issues.

Original comment by yuri.kan...@gmail.com on 14 May 2012 at 11:16