80,362
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout android:id="@+id/bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="5px"
android:paddingRight="5px"
android:paddingTop="10px"
xmlns:android="http://schemas.android.com/apk/res/android">
<SeekBar android:id="@+id/progress"
style="?android:attr/progressBarStyleHorizontal"
android:progressDrawable="@layout/seekbar_style"
android:thumb="@layout/thumb"
android:layout_width="fill_parent"
android:layout_height="10px"
android:paddingLeft="10px"
android:paddingRight="10px"/>
<TextView android:id="@+id/current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/progress"
android:layout_alignParentLeft="true"
android:padding="10px"
xmlns:android="http://schemas.android.com/apk/res/android"/>
<TextView android:id="@+id/total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/progress"
android:layout_alignParentRight="true"
android:padding="10px"
xmlns:android="http://schemas.android.com/apk/res/android"/>
</RelativeLayout>
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background"
android:paddingTop="3px"
android:paddingBottom="3px">
<shape>
<corners android:radius="10dip" />
<gradient
android:startColor="#ffffffff"
android:centerColor="#ff000000"
android:endColor="#ff808A87"
android:centerY="0.45"
android:angle="270"/>
</shape>
</item>
<item android:id="@android:id/progress"
android:paddingTop="3px"
android:paddingBottom="3px" >
<clip>
<shape>
<corners android:radius="10dip" />
<gradient
android:startColor="#ffffffff"
android:centerColor="#ffFFFF00"
android:endColor="#ffAABD00"
android:centerY="0.45"
android:angle="270"/>
</shape>
</clip>
</item>
</layer-list>
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 按下状态 -->
<item
android:state_pressed="true"
android:drawable="@drawable/seekbar_down" />
<!-- 普通无焦点状态 -->
<item
android:state_focused="false"
android:state_pressed="false"
android:drawable="@drawable/seekbar_down" />
</selector>
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout android:id="@+id/bar"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dip"
android:paddingRight="5dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<SeekBar android:id="@+id/progress"
style="?android:attr/progressBarStyleHorizontal"
android:progressDrawable="@layout/seekbar_style"
android:thumb="@layout/thumb"
android:layout_width="fill_parent"
android:layout_height="22dip"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:paddingTop="2dip"
android:paddingBottom="6dip"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"/>
<TextView android:id="@+id/current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/progress"
android:layout_marginLeft="20dip"
android:textSize="12dip"
xmlns:android="http://schemas.android.com/apk/res/android"/>
<TextView android:id="@+id/total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/progress"
android:layout_alignParentRight="true"
android:layout_marginRight="20dip"
android:textSize="12dip"
xmlns:android="http://schemas.android.com/apk/res/android"/>
</RelativeLayout>