android - How to implement thumb RangeSeekbar for height in feet and inches -
i want implement thumb rangeseekbar height height in feet , inches. absolute min value 4.1 , absolute max value 6.12. have done there 1 problem range should not go above 4.12, 4.13. , on. in 4.11 next range 5 not 4.12, can solve issue.
below xml code
<com.yahoo.mobile.client.android.util.rangeseekbar.rangeseekbar android:id="@+id/rangeseekbar" android:layout_width="fill_parent" android:layout_height="wrap_content" rsb:absolutemaxvalue="6.12" rsb:absoluteminvalue="4.1" />
below java code
public class mainactivity extends appcompatactivity { button submitbutton; float i; float j; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); toolbar toolbar = (toolbar) findviewbyid(r.id.toolbar); submitbutton=(button)findviewbyid(r.id.submitbutton); setsupportactionbar(toolbar); rangeseekbar rangeseekbar = (rangeseekbar) findviewbyid(r.id.rangeseekbar); rangeseekbar.setnotifywhiledragging(true); rangeseekbar.setonrangeseekbarchangelistener(new rangeseekbar.onrangeseekbarchangelistener() { @override public void onrangeseekbarvalueschanged(rangeseekbar bar, object minvalue, object maxvalue) { i= (float) minvalue; j= (float) maxvalue; } }); submitbutton.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { log.e("min value**************",string.valueof(((float) i))); log.e("max value**************", string.valueof(((float) j))); } }); }
wiki
Comments
Post a Comment