0

android : id = "@ + id/RelativeLayout02"및 android : layout_alignParentBottom = "true"인 상대 레이아웃이 있습니다.상대 레이아웃을 번역하여 다른 레이아웃 위에 액티비티를 채우는 방법은 무엇입니까?

사용자가이 레이아웃을 위로 드래그하여 화면을 채우고 다른 레이아웃 위에 배치하고 싶습니다.

드래그 작업에 애니메이션을 적용하고 싶습니다. 예를 들어, 사용자가 상대 레이아웃을 화면의 중간으로 드래그하면 화면의 절반 만이 relativeLayout으로 채워 져야합니다.

여기 내 XML 레이아웃 당신의 지침에 미리

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout android:id="@+id/RelativeLayout01" 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:background="#FFFFFF" 
android:orientation="vertical"> 
<LinearLayout android:id="@+id/LinearLayout01" 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:layout_marginBottom="20px" 
android:orientation="vertical" 
android:gravity="center_horizontal" 
> 
<ImageView android:id="@+id/ImageView01" 
    android:layout_width="200dip" 
    android:layout_height="81dip" 
    android:src="@drawable/logo" 
android:adjustViewBounds="true" 
android:layout_marginTop="15px"/> 
<TextView android:id="@+id/TextView01" 
    android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:gravity="center_horizontal" 
android:textColor="#FF9600""/> 
</LinearLayout> 
<eg.com.innova.smarthome.custom.CustomLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:gravity="center_horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:layout_below="@id/LinearLayout01"> 
<ImageButton android:id="@+id/sensors" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:background="@drawable/sensors" 
    android:onClick="sensorImageClick"/> 
<ImageButton android:id="@+id/camera_outdoor" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:background="@drawable/camera_outdoor" 
android:onClick="cameraImageClick"/> 
<ImageButton android:id="@+id/statistics" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:background="@drawable/statistics"/> 
<ImageButton android:id="@+id/configuration2" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:background="@drawable/configuration2" 
android:layout_margin="10px"/> 
</eg.com.innova.smarthome.custom.CustomLayout> 
<RelativeLayout android:id="@+id/RelativeLayout02" 
xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="horizontal" 
android:layout_width="fill_parent" 
android:layout_height="50dip" 
android:layout_alignParentBottom="true" 
android:background="#9CC721" 
android:gravity="center_horizontal|center_vertical"> 
</RelativeLayout> 
</RelativeLayout> 

감사합니다.

답변

1

나는 내 자신의 질문에 대한 해결책을 찾았습니다.

청혼은 SlidingDrawer을 사용합니다.

튜토리얼은 here입니다.

관련 문제