Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code review request #3

Open
GoogleCodeExporter opened this issue Apr 10, 2016 · 7 comments
Open

Code review request #3

GoogleCodeExporter opened this issue Apr 10, 2016 · 7 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

Thank you so much for your re-submittal! 

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant