1
我正在尝试制作一个音乐播放器,我使用屏幕上的几乎所有区域播放列表。 在scrren的底部,您会看到一个带有播放/暂停按钮,seekbar然后停止按钮的小型“播放器”。 如果你拖动“播放器”,它会显示你的专辑封面和一些更多的信息。SlidingDrawer的句柄中的Seekbar
所以,我得到了布局完成,但我无法移动seekbar的拇指。 我在想,这是因为它是滑动手柄的一部分。 如果我是对的,有没有其他的方式来做到这一点?
这里是我的slidingdrawer提前
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="match_parent"
android:layout_height="450dp"
android:layout_gravity="bottom"
android:content="@+id/content"
android:handle="@+id/handle" >
<TableRow
android:id="@+id/handle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/hz_background_gradient"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageButton1"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/playback_play"
android:layout_marginLeft="6dp"
android:layout_marginTop="4dp" />
<SeekBar android:id="@+id/editText1"
android:layout_width="203dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="0.45"
android:layout_marginTop="8dp"
android:max="100" />
<ImageView
android:id="@+id/imageButton1"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/playback_stop"
android:layout_marginLeft="6dp"
android:layout_marginTop="4dp"
android:layout_marginRight="5dp" />
</LinearLayout>
</TableRow>
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="167dp"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="272dp"
android:layout_weight="0.83"
android:src="@drawable/ic_launcher"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:layout_marginTop="25dp" />
<TableRow
android:id="@+id/tbR1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.98"
android:background="@drawable/hz_background_gradient"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Titel: "
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/tvTitel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Put a spell on you"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Artist: "
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/tvArtist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Credence Clearwater Revival"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</LinearLayout>
</TableRow>
</LinearLayout>
</SlidingDrawer>
感谢布局:)
非常感谢你 – 2013-06-07 18:45:05