Giter VIP home page Giter VIP logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Hi Mike,

I was thinking about this issue.
There are next solutions:
 1) use the way you described, but it will work so slowly in case there are thousands/millions wheel elements.
 2) calculate the width each time elements are changed, to be as long as the longest visible item. In this case the wheel will be "dancing"
 3) use the same width for all wheel items
 4) specify the wheel width manually

I think, the 1st and 2nd ways are not good.
If you know the wheel contains not too much items the 1st way is acceptable.
This functionality can be moved to separated method that can be overridden by 
subclasses.

Original comment by [email protected] on 31 Mar 2011 at 11:22

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Hi,

I would suggest option 2 where the size can only grow + an option to manually 
force-set the initial width (option 3).

Original comment by [email protected] on 1 Apr 2011 at 6:37

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
This bug can be seen even in the Demo Wheel application:

Open the "time 2" example and scroll the hour wheel all the way down.

Original comment by [email protected] on 13 Sep 2011 at 12:46

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Any suggestions for getting around this? I am hoping to use the Wheel in a 
similar fashion as Time2-example. How can I force each item to be visible, 
somehow forcing the hour wheel (in my case 0->23) to the width of the "23"-item?

Original comment by [email protected] on 29 Nov 2011 at 5:03

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Just found one simple workaround: just set the width of the hours-item 
manually, instead of "wrap_content".

Original comment by [email protected] on 29 Nov 2011 at 5:06

from android-wheel.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Yuri, both JList and JComboBox in Swing solved this problem by letting you 
define a "prototype" value that is used to compute the cell width: the 
framework doesn't know what would be good width but the programmer often does! 
That would be a special case of your option 3). That works very well for us 
Swing programmers; no need to complicate things.

Original comment by [email protected] on 5 Feb 2012 at 2:58

from android-wheel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.