<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"
tools:context=".Login" >
<ImageView
android:id="@+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_margin="5dp"
android:contentDescription="@string/app_name"
android:src="@drawable/logo_main" />
<TextView
android:id="@+id/tv_textBottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:clickable="true"
android:text="@string/label_copyright"
android:textColor="@color/text_grey" />
<ScrollView
android:id="@+id/sv_Login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/logo"
android:layout_marginTop="10dp" >
<RelativeLayout
android:id="@+id/rl_Login"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
//Inside this manage two editText for userId, Password
</RelativeLayout>
</ScrollView>
同样在登录清单中,我设置
android:windowSoftInputMode="adjustResize"
我的问题是当软键波弹出时,底部文本(tv_textBottom(随着键盘向上移动。我尝试了很多方法,需要滚动视图并将父底部文本放在父文本本身中。 提前致谢...
//try this
**AndroidManifest.xml**
android:windowSoftInputMode="stateHidden"
<LinearLayout 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:gravity="center"
android:orientation="vertical"
android:padding="5dp"
tools:context=".Login" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
<ImageView
android:id="@+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:contentDescription="@string/app_name"
android:src="@drawable/logo_main" />
</LinearLayout>
<ScrollView
android:id="@+id/sv_Login"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginTop="10dp" >
<RelativeLayout
android:id="@+id/rl_Login"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
//Inside this manage two editText for userId, Password
</RelativeLayout>
</ScrollView>
<TextView
android:id="@+id/tv_textBottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:text="@string/label_copyright"
android:textColor="@color/text_grey"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"/>
</LinearLayout>