안드로이드에서 SlidingDrawer를 사용하려고 시도하고 있습니다.안드로이드 SlidingDrawer
ImageButton "handle"을 클릭하면 SlidingDrawer "slidingDrawerMP"가 "coversSongLayout"선형 레이아웃과 중첩되지만 작동하지 않습니다. 제안 사항이 있으십니까?
감사합니다<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="top"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout android:id="@+id/coversSongLayout"
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:layout_weight="1">
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/coversLayout" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:columnWidth="90dp"
android:numColumns="auto_fit" android:verticalSpacing="10dp"
android:horizontalSpacing="10dp" android:stretchMode="columnWidth"
android:gravity="center" android:layout_weight="1" />
</LinearLayout>
<FrameLayout android:id="@+id/linearLayoutMP"
android:layout_height="28dp" android:gravity="bottom"
android:layout_width="fill_parent" android:background="@android:color/transparent"
android:layout_margin="0dip">
<SlidingDrawer android:id="@+id/slidingDrawerMP"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:handle="@+id/handle" android:content="@+id/content"
android:background="#aa0000">
<ImageButton android:id="@+id/handle"
android:layout_width="wrap_content" android:src="@drawable/up"
android:background="#fff" android:layout_height="wrap_content"></ImageButton>
<LinearLayout android:id="@+id/content"
android:background="#ccaaaaaa" android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout android:gravity="center"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:id="@+id/currentSongLayout">
<LinearLayout android:id="@+id/coverLayout"
android:orientation="horizontal" android:gravity="center"
android:layout_height="wrap_content" android:layout_width="fill_parent">
<ImageView android:id="@+id/cover" android:src="@drawable/generic_cover"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout android:id="@+id/songLayout"
android:orientation="horizontal" android:gravity="center"
android:layout_height="wrap_content" android:layout_width="fill_parent">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Unknowed Song" />
</LinearLayout>
<LinearLayout android:id="@+id/artistAlbumLayout"
android:orientation="horizontal" android:gravity="center"
android:layout_height="wrap_content" android:layout_width="fill_parent">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Unknowed Artist" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text=" - " />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Unknowed Album" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</SlidingDrawer>
</FrameLayout>
<LinearLayout android:id="@+id/mediaControls"
android:orientation="horizontal" android:background="#ccaaaaaa"
android:layout_width="match_parent" android:layout_height="53dp">
<ImageButton android:layout_height="wrap_content"
android:background="@null" android:layout_width="fill_parent"
android:layout_weight="1" android:src="@drawable/prev" android:id="@+id/prev"></ImageButton>
<ImageButton android:layout_height="wrap_content"
android:background="@null" android:layout_width="fill_parent"
android:layout_weight="1" android:src="@drawable/play" android:id="@+id/play" />
<ImageButton android:layout_height="wrap_content"
android:background="@null" android:layout_width="fill_parent"
android:layout_weight="1" android:src="@drawable/next" android:id="@+id/next" />
</LinearLayout>
</LinearLayout>
감사합니다. 나는 "linearLayoutMP"높이를 "fill_content"로 설정했으며 SlidingDrawer 앞에 "linearLayoutMP"내부에서 "coversSongLayout"을 이동했습니다. 이제는 –
도와 드리겠습니다 :) – rDroid