改变seekbar的游标图片大小
2014-05-06 15:37
253 查看
url:
http://stackoverflow.com/questions/9699951/changing-size-of-seekbar-thumb
The most flexible way to set thumb size for me is to create layered-drawable with shape as placeholder
So basically changing the size of shape will stretch drawable, the shape is transparent so it won't be visible. Also the minimum size of such thumb is size of bitmap.
Here is example of layout:
http://stackoverflow.com/questions/9699951/changing-size-of-seekbar-thumb
The most flexible way to set thumb size for me is to create layered-drawable with shape as placeholder
thumb_image.xml:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item> <shape> <size android:height="40dp" android:width="40dp" /> <solid android:color="@android:color/transparent" /> </shape> </item> <item android:drawable="@drawable/scrubber_control_normal_holo"/> </layer-list>
So basically changing the size of shape will stretch drawable, the shape is transparent so it won't be visible. Also the minimum size of such thumb is size of bitmap.
Here is example of layout:
<SeekBar android:id="@+id/seekBar1" android:layout_width="match_parent" android:layout_height="wrap_content" android:thumb="@drawable/thumb_image" /> <SeekBar android:id="@+id/seekBar2" android:layout_width="match_parent" android:layout_height="wrap_content" />
相关文章推荐
- 【改进】Qt界面显示图片,在图上绘制图形,拖动顶点改变大小
- java在label 上设置图片并且可以随便改变大小的方法
- C# 改变图片大小的功能代码片段 (wince5)
- 在编写网站的时候,给一个div设置背景图片,怎么让这个图片随着div大小的改变,而等比例的缩放。
- Andorid WebView内容自适应并改变图片大小
- java 改变图片大小-3
- Java改变图片的大小
- 批量改变图片大小
- 鼠标滚轮改变图片大小
- RadioButton动态改变drawableTop的图片大小
- 如何改变图片的大小kb
- 02-改变图片文件的大小
- 用Windows画图改变图片大小(附Linux企鹅头像完全版)。
- JAVA改变上传图片大小
- Jtable添加图片,并自由改变图片大小
- jQuery动态改变图片显示大小(修改版)
- (12)改变图片的大小生成缩略图
- 上传图片并改变图片大小
- 如何使用JS等比例改变显示图片的大小
- jQuery动态改变图片显示大小(修改版)