且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Android的自定义搜索栏

更新时间:2023-11-23 23:22:34

 <搜索栏
                机器人:ID =@ + ID / seekBar1
                机器人:layout_width =match_parent
                机器人:layout_height =34dip
                机器人:progressDrawable =@可绘制/条
                机器人:拇指=@可绘制/ icon_small
                机器人:layout_weight =3.0/>
 

您可以简单地设置progressDrawble,拇指和的backgroung属性,你会得到你想要的。

I want to customize seekbar in android.

Can anybody guide me how it can be done? I am new to android.

<SeekBar
                android:id="@+id/seekBar1"
                android:layout_width="match_parent"
                android:layout_height="34dip"
                android:progressDrawable="@drawable/strip"
                android:thumb="@drawable/icon_small"
                android:layout_weight="3.0" />

You can simply set progressDrawble,thumb and backgroung attribute and you will get all you want.