이 레이아웃과 위젯의 단지 배치, 여기 입니다, 당신은이 같은 설계 사랑하는 위젯과 레이아웃을 넣을 수 있습니다, 내가 만든 샘플 XML입니다
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:padding="@dimen/padding_medium"
android:text="@string/hello_world"
tools:context=".MainActivity" />
<SlidingDrawer android:id="@+id/SlidingDrawer" android:handle="@+id/slideHandleButton"
android:content="@+id/contentLayout" android:layout_width="wrap_content"
android:layout_height="120dp" android:orientation="vertical"
android:layout_alignParentBottom="true"
>
<Button
android:layout_width="fill_parent"
android:layout_height="10dp"
android:id="@+id/slideHandleButton"
android:background="#00868B" />
<LinearLayout
android:id="@+id/contentLayout"
android:layout_width="fill_parent"
android:layout_height="150dp"
android:background="#90000000"
android:gravity="center|top"
>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="150dp"
android:layout_weight="1"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_gravity="center_vertical"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@drawable/diego"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Diego"
/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_gravity="center_vertical"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@drawable/ellie"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Ellie"
/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_gravity="center_vertical"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@drawable/scart"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sid"
/>
</LinearLayout>
</FrameLayout>
</LinearLayout>
</SlidingDrawer>
그냥이 붙여 넣기 프로그램에서 작업중인 데이터를 볼 수 있습니다. 지금 코드를 작성할 필요가 없으며 필요에 따라 관련된 이벤트를 처리 할 수 있습니다. 여기 사이트에서 이미지를 사용 했으므로 일부 이미지를 다운로드하거나 기존 이미지를 사용하고이 코드에서 사용 된 드로어 블을 교체하십시오. 희망을 얻으실 수 있습니다.
샘플을 보내 주셔서 감사합니다. 기술적으로 저는 3 단 포지션 서랍 뒤에 있습니다. 완전 개방, 부분 개방, 폐쇄 서랍을 부분적으로 열 수 있습니까? 또는이 기능을 지원하기 위해 새로운 컨트롤을 처음부터 새로 만들어야하는 무언가입니까? –
예, tat와 같은 서랍을 만들 수 있습니다. 한 번에 2 개의 서랍을 디자인해야합니다. 하나의 손잡이는 첫 번째 서랍을 열고 그 서랍은 다음 서랍을 처리합니다. 서랍의 레이아웃 ID를 두 번째 서랍 핸들에 전달해야합니다. –