如何自定义seekbar android

时间:2017-07-09 16:29:26

标签: android android-layout seekbar

您好我正在尝试在Android上自定义搜索栏,但我认为拇指视图有问题。问题是拇指的两面。 听到是我的代码。

[ 33%] Building CXX object CMakeFiles/Project.dir/main.cpp.obj
[ 66%] Building CXX object CMakeFiles/Project.dir/soundclass.cpp.obj
In file included from C:\projectPath\soundclass.cpp:4:0:
C:\projectPath\soundclass.h:21:24: fatal error: dsound.h: No such file or directory
In file included from C:\projectPath\main.cpp:5:0:
C:\projectPath\soundclass.h:21:24: fatal error: dsound.h: No such file or directory
compilation terminated.
compilation terminated.
CMakeFiles\Project.dir\build.make:61: recipe for target 'CMakeFiles/Project.dir/main.cpp.obj' failed
CMakeFiles\Project.dir\build.make:85: recipe for target 'CMakeFiles/Project.dir/soundclass.cpp.obj' failed
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/Project.dir/all' failed
mingw32-make.exe[3]: *** [CMakeFiles/Project.dir/main.cpp.obj] Error 1
mingw32-make.exe[3]: *** Waiting for unfinished jobs....
mingw32-make.exe[3]: *** [CMakeFiles/Project.dir/soundclass.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles/Project.dir/all] Error 2
CMakeFiles\Makefile2:78: recipe for target 'CMakeFiles/Project.dir/rule' failed
Makefile:117: recipe for target 'Project' failed
mingw32-make.exe[1]: *** [CMakeFiles/Project.dir/rule] Error 2
mingw32-make.exe: *** [Project] Error 2

thm_s.xml

<SeekBar
    android:id="@+id/seekBar"
    android:layout_width="300dp"
    android:layout_height="wrap_content"
    android:max="10"
    android:thumb="@drawable/thm_s"
    android:secondaryProgress="5"
    android:progress="5"
    android:progressDrawable="@drawable/seekbar_background"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:layout_marginBottom="94dp" />

seekbar_background.xml

<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
<solid
    android:color="#ffffff"/>
<size
    android:width="20dp"
    android:height="20dp"/>
</shape>

请查看此图片。 https://drive.google.com/file/d/0BxpdBDS2CMCWTExFREVqVmt6Nk0/view?usp=drivesdk

0 个答案:

没有答案