1. SC20120626-174121.png 2. SC20120626-174128.png

 

안녕하세요. 키보드 위에 메뉴를 올리려고 합니다.

구글링을 통해서 scrollview와 android:windowSoftInputMode="stateHidden|adjustResize" 를 적용하였습니다.

 

1번 화면에서 가운데 edittext(처음에는 안보임)를 클릭하면 2번 화면과 같이 하단버튼을 View.VISIBLE 해줍니다.

안드로이드 이미지 사이즈도 그대로 나옵니다.

스크롤을 하여도 하단버튼은 하단에 그대로 있어 원하는 대로 나왔는데요.

그런데 2번 화면을 자세히 보시면 안드로이드 로봇의 다리와 버튼이 겹쳐서 보여집니다.

제가 원하는건 안드로이드 로봇은 모두 다 보이고 그 밑에 메뉴가 있었으면 합니다.

 

xml은 아래와 같습니다.

조언 부탁드립니다.

 

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <EditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true" />

    <ScrollView
        android:id="@+id/scroll"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" >

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >

            <ImageView
                android:id="@+id/imageview"
                android:layout_width="400dp"
                android:layout_height="400dp"
                android:layout_centerInParent="true"
                android:scaleType="fitXY"
                android:src="@drawable/ic_launcher" />

            <EditText
                android:id="@+id/edittext"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_alignParentTop="true"
                android:layout_centerHorizontal="true" />
        </RelativeLayout>
    </ScrollView>
   
    <Button
        android:id="@+id/btn"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="하단버튼"
        android:layout_alignParentBottom="true"
        android:visibility="gone" />

</RelativeLayout>

profile

give & take