搜索栏的按钮点击移动 [英] movement of seekbar on button click

查看:90
本文介绍了搜索栏的按钮点击移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个查询要求。

我怎么能移动搜索栏上的按钮点击0.25递增

How can i move a seekbar on a button click incrementing by 0.25

即我已经创建了两个按钮,调增+和 - 为decrease.Is这可能吗?

i.e i have created two buttons + for increase and - for decrease.Is it possible??

我已经设置最大搜索栏60和onProgress变化,我0.25乘以进度值0.25递增我的precision的。但我的搜索栏不移动上的每个按钮点击IE浏览器的数值0〜1它不动,从0.25到0.75,点击从0.75后移动到1。我没有得到它继续前进的每个值。

I have set "max" of seekbar 60 and onProgress change I am multiplying the progress value by 0.25 to increment my precision by 0.25. But my seekbar is not moving on each button click i.e for value 0 to 1 it doesn't move from 0.25 to 0.75, after clicking from 0.75 it moves to 1. I am not getting it to move on each value.

推荐答案

AFAIK,您不能使用浮点值作为微调的进度。它必须是整数value.so更好您设置为整数值,一共需要多少的点击用户达到最右边微调的端最大的进步。

AFAIK,you cannot use float value as progress of spinner. It must be an Integer value.so better you set maximum progress as an integer value that is total of how many clicks you want user to reach to right most side of spinner.

例。你希望用户给予10次点击来自左去右微调,只需设定的最大进步为10。

Ex. you want user to give 10 clicks for going from left to right in spinner,just set maximum progress as 10.

所以,如果你想要的行为就像你问的话..

So if you want behavior like you asked for,then..

有关Examlple:您希望用户看到他每次点击微调时间1〜5进度递增0.25,然后设置你的陆侃如5 * 4 = 20 ,然后显示增量,因为它被添加通过在每个click.but 0.25实际上,你将有只有1递增的进展。

For Examlple: you want user to see 1 to 5 progress incremented by 0.25 each time he clicks on spinner,then set your progess as 5*4=20 and then show increment as it is added by 0.25 in each click.but actually you will have to increment progress by 1 only.

这篇关于搜索栏的按钮点击移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆