简体   繁体   English

在运行时在Android或自定义seekbar中将最小值设置为seekbar

[英]set min value to seekbar at runtime in android or custom seekbar to do so

I am searching code for seekbar minimum value setting at runtime. 我正在运行时在搜索代码中搜索杆最小值设置。 taking min value and adding into progress value in progresschanged function will not solve my issue. 在progresschanged函数中采用最小值并增加进度值将无法解决我的问题。

My code is having multiple seekbar, second seekbar min value is depend on first seekbar selection value. 我的代码有多个搜索栏,第二个搜索栏的最小值取决于第一个搜索栏的选择值。 with adding min value as first seekbar progress value. 加上最小值作为第一个搜索栏进度值。 it is crashing as addition og both was exceeding max value and it is not feasible when i am trying for 6 seekbars. 它的崩溃是因为添加og和两者都超过了最大值,当我尝试使用6个搜索杆时这是不可行的。

I have also searched for custom seekbar, where they are providing min and max value setting runtime, but i didnot find progress value. 我还搜索了自定义搜寻栏,它们在其中提供最小和最大值设置运行时,但是我没有找到进度值。

I didnot understand how google left such widget.Please let me know if any solution is there. 我不明白谷歌如何离开这样的小部件。请告诉我是否有解决方案。 In my requirement max value is fix and min value varies based on previos seekbar selection. 在我的要求中,最大值是固定的,最小值根据previos搜寻栏的选择而变化。

Please find the library for custom seek bar.It provides different types of seek bar. 请找到用于自定义搜索栏的 。它提供了不同类型的搜索栏。 You can change bar value programatically using 您可以使用以下方式以编程方式更改条值

rangeSeekbar.setMinStartValue(float minValue).apply();

and

rangeSeekbar.setMinStartValue(float minValue).setMaxStartValue(float maxValue).apply();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM