Android的搜索栏自定义拇指 [英] Android seekbar with custom thumb

查看:101
本文介绍了Android的搜索栏自定义拇指的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个搜索栏这样的形象:

I want to create a seekbar like in this image:

现在的问题是,如何把进度线以上的拇指?

The question is, how to place thumb above the progress line?

这行

android:thumb="@drawable/thumb"

放置拇指的线的中心。有什么建议?

places the thumb in the center of the line. Any suggestions?

推荐答案

您可以假设整个酒吧和上面的拇指为一个搜索栏
你所要做的仅仅是包括进步和背景图像栏上方的空白区域,包括拇指图像中的拇指下方的空白区域。

you can assume the whole bar and the above thumb as one seekbar what you have to do is just include the blank area above the bar in progress and background image and include the blank area below the thumb in the image for thumb.

这篇关于Android的搜索栏自定义拇指的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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