我在appbar上面有一个静态图像,我正在使用包含我的编辑文本的scrollView。所以问题是,当我专注于编辑文本时,软键盘会隐藏我的字段。它无法推送应用栏图像。我尝试使用android:windowSoftInputMode =“adjustPan | adjustUnspecified”所有这些组合,但它没有用。可以任何一个建议更好的出路。
我的根视图
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_register_simplify"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="org.tta.mobile.view.Register_simplify">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:fitsSystemWindows="false"
app:expanded="false">
<LinearLayout
android:layout_width="413dp"
android:layout_height="145dp"
android:background="@drawable/mx_header_banner">
</LinearLayout>
<!--Tab layout-->
<LinearLayout
android:layout_height="64dp"
android:id="@+id/register_simplified_tablayout_ll_id"
android:visibility="visible"
android:orientation="vertical"
android:layout_width="match_parent">
<android.support.design.widget.TabLayout
android:layout_width="match_parent"
app:tabMode="fixed"
app:tabGravity="fill"
android:layout_height="@dimen/mx_signup_signin_top_tablayout_height"
style="@style/MyCustomTabLayout"
app:tabTextColor="@color/black"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
app:tabIndicatorColor="#22d2c5"
android:id="@+id/mRegisteractivityTabs">
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="SIGN-IN"
/>
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text="REGISTER"
/>
</android.support.design.widget.TabLayout>
</LinearLayout>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
和我在pageviewer中的视图,其中包含字段
<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"
android:id="@+id/mx_sign_up_fragment"
android:orientation="vertical"
android:background="@android:color/white"
tools:context="org.tta.mobile.mx_views.SignUpFragment">
<!--android:paddingTop="@dimen/mx_scroll_view_top_padding"-->
<ScrollView
android:id="@+id/scrollview_register"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="50dp"
android:background="@android:color/white"
android:layout_centerVertical="true"
android:layout_alignParentStart="true">
<LinearLayout
android:id="@+id/registrationLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/manprax_sign_in_Layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp">
<LinearLayout
android:id="@+id/message_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<include layout="@layout/panel_message_with_check" />
</LinearLayout>
<LinearLayout
android:id="@+id/required_fields_layout_register"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="5dp"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/mx_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/white"
android:layout_alignParentBottom="true">
<!-- <FrameLayout
android:layout_height="40dp"
android:layout_width="match_parent"
android:focusable="true"
android:id="@+id/mx_signup_remember_me_layout" >
<CheckBox
android:layout_width="match_parent"
android:id="@+id/mx_signup_remember_me_Chkbx"
android:text="Remember me"
android:layout_height="40dp" />
</FrameLayout>-->
<FrameLayout
style="@style/edX.Widget.Sign_In_Manprax_Layout"
android:layout_height="@dimen/mx_btn_height"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:focusable="true"
android:id="@+id/send_OTP_button_layout"
android:contentDescription="@string/create_account_btn">
<TextView
style="@style/edX.Widget.SignInButton"
android:id="@+id/send_OTP_tv"
android:text="@string/send_OTP_text" />
<include layout="@layout/button_progress_indicator" />
</FrameLayout>
</LinearLayout>
</RelativeLayout>