布局推高不起作用

时间:2013-12-01 11:21:43

标签: android android-layout android-edittext android-softkeyboard

我的观点很简单。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:layout_width="match_parent"
                    android:id="@+id/main"
                    android:layout_height="match_parent"
                    android:orientation="vertical"
                    android:background="@color/gray2"
                    android:padding="10dp"
                    android:clickable="true">
        <LinearLayout
                android:id="@+id/bannerLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@android:color/black">
            <ImageView
                    android:layout_height="@dimen/orange_kino_image_size"
                    android:layout_width="match_parent"
                    android:src="@drawable/veralicqavorum"/>
        </LinearLayout>


        <LinearLayout
                android:id="@+id/layout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:orientation="vertical"
                android:layout_marginBottom="10dp"
                android:layout_centerInParent="true"
                android:layout_marginTop="@dimen/recharge_margin_top">
            <TextView
                    android:id="@+id/rechargeText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textSize="@dimen/balance_text_size"
                    android:gravity="center"
                    android:layout_marginLeft="@dimen/tablet_marginButton"
                    android:layout_marginRight="@dimen/tablet_marginButton"
                    android:text="@string/enter_your_14_digit"/>
            <EditText
                    android:id="@+id/account_recharge_editText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/tablet_marginButton"
                    android:layout_marginRight="@dimen/tablet_marginButton"
                    android:inputType="number"
                    android:maxLength="14"/>

        </LinearLayout>
        <Button
                android:id="@+id/rechargeButton"
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:layout_below="@id/layout"
                android:layout_marginLeft="@dimen/tablet_marginButton"
                android:layout_marginRight="@dimen/tablet_marginButton"/>

当打开软键盘时,只有部分布局正在向上推。更具体地说,bannerLayout(这是LinearLayout的id)始终位于视图的顶部,但@ id / layout和@id / rechargeButton正在推高。 textView转到imageview。

我应该为@ id / bannerLayout做些什么,也推高了。

0 个答案:

没有答案
相关问题