2014-09-29 99 views
0

我尝试创建一个自定义搜索条是这样的:http://i.stack.imgur.com/8B0Q8.png如何创建自定义搜索栏并进行优化?

但我遇到问题该问题:http://i.stack.imgur.com/rcQG7.png

我用这个项目来动态改变文本:github.com/Amit-Gupta26/AndroidCustomSeekBar

我的布局代码是在这里:

<RelativeLayout 
android:id="@+id/layout_seekbar" 
android:layout_width="match_parent" 
android:layout_height="0dp" 
android:layout_weight="1" 
android:background="@drawable/seekbar_bg" > 

<SeekBar 
    android:id="@+id/seekbar" 
    style="@style/CustomSeekBar" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentLeft="false" 
    android:layout_alignParentTop="false" 
    android:layout_centerHorizontal="true" 
    android:layout_centerVertical="true" /> 

我尝试了许多不同的方法。但我无法在所有屏幕上实现稳定。 这怎么办?

回答

0

我认为这篇文章将帮助您:

Custom Seekbar

还需要使用9patch图像

0

看着你所面临的问题后,我相信,你的问题不是如何建立一个自定义的搜索栏,但如何控制拇指大小和每个单独的条形大小,如使得爬得更大,而不必使条形或结尾很大,我看到你必须看看hereherehere

相关问题