Savan7002 / range-seek-bar

Automatically exported from code.google.com/p/range-seek-bar
0 stars 0 forks source link

Code review request #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
XML layout support and support for specification of initial values e.g bar goes 
from 0-10 but loads with 3-6 selected

attrs.xml goes in project res/values folder
schedule.xml goes in project res/layout folder

Original issue reported on code.google.com by psinn...@gmail.com on 5 Oct 2011 at 12:25

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 5 has been merged into this issue.

Original comment by tittel@kom.e-technik.tu-darmstadt.de on 14 Nov 2011 at 9:47

GoogleCodeExporter commented 9 years ago
Hi,
This code is great and runs as intended in a test program. How can I access the 
thumbs positions in the Activity class so that I can print out the value on 
screen? Worth adding to RangeSeekbar.java a get() or a set() function to get 
the value/s or change the position/s from the calling class.
Thanks,
Ranger Joe

Original comment by LabTes...@gmail.com on 9 Mar 2012 at 7:10

GoogleCodeExporter commented 9 years ago
I think what you are looking for is getSelectedMinValue and getSelectedMaxValue.

Original comment by psinn...@gmail.com on 9 Mar 2012 at 7:21

GoogleCodeExporter commented 9 years ago
Ranger Joe,

You just need to add a Listener.  Then you can choose to get updates as the 
user is dragging the thumbs or just get one update when they let go.

Original comment by TheBeast.13@gmail.com on 9 Mar 2012 at 7:21

GoogleCodeExporter commented 9 years ago
Activity class has the listener recommended on this site (slightly modified), 
but not sure how to find out info about the thumbs positions or the amount that 
is selected...
Formerly when using straight-up seekbar implementation, I had function like 
this in Activity class: 
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser).
"progress" helped me figure out how far I was. Then I converted that into 
hours:minutes. 

Attached listener in case someone willing to modify it for the xml 
implementation. Note that the xml implementation here puts the RangeSeekBar in 
the layout called "betweens". 

From the Activity class, I need to get the meaningful positions and also to be 
able to set the positions of the thumbs.

Original comment by LabTes...@gmail.com on 9 Mar 2012 at 8:11

Attachments:

GoogleCodeExporter commented 9 years ago
I'm not sure what has happened to the project since I submitted this code 
review request but this is what my app uses.

In layout xml file : 

<x.y.RangeSeekBar android:id="@+id/inouts" rangeseekbar:startingMin="10.0" 
rangeseekbar:startingMax="23.984" rangeseekbar:min="10.0" 
rangeseekbar:max="23.984" android:layout_width="fill_parent" 
android:layout_height="wrap_content" />

In activity onCreate : 

RangeSeekBar inouts = (RangeSeekBar) findViewById(R.id.inouts);
                inouts.setOnRangeSeekBarChangeListener(this);

In activity : 

public void rangeSeekBarValuesChanged(RangeSeekBar rangeSeekBar , Number 
minValue, Number maxValue)
{
}

Original comment by psinn...@gmail.com on 9 Mar 2012 at 8:31

GoogleCodeExporter commented 9 years ago
Thank you so much for your re-submittal! 

Original comment by LabTes...@gmail.com on 9 Mar 2012 at 11:50