Hi! I am working on an extension about SeekBar (Slider)
In the extension, I need to convert the component of Slider (it's a param) to SeekBar type, and also the other way round.
What should I do?
Hi! I am working on an extension about SeekBar (Slider)
In the extension, I need to convert the component of Slider (it's a param) to SeekBar type, and also the other way round.
What should I do?
Use getView()
method.It will return u a View type , You can easily type cast it to SeekBar, as the View is a superType of the SeekBar.
SeekBar mySeekBar = (SeekBar ) slider.getView();
This thread will be helpful:
BTW, another work around is to store Your SeekBar and Slider in a Hashtable so you can get any one of them, example:
Slider mySlider = Sliders.get(SeekBar);
Thank you so much, this is exactly what I needed.
Will be back if there's no problem
I'm not understanding the way to do it, so I guess I will go with Hashmap/table
It wasn't easy for me to make it with an undefined component type, but i think it would be easier for you to do, You can construct a Slider type with all the properties of the SeekBar.
That works too
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.