【发布时间】:2015-08-24 08:12:05
【问题描述】:
我创建了带有滚动视图的注册屏幕,其中包含编辑文本和操作栏。当键盘打开布局 getshrink 时,我在 androidmanifest 文件中使用了 adjustPan 和 adjustResize。
AndroidManifest.xml
<activity android:name=".UserRegistration"
android:windowSoftInputMode="adjustPan|adjustResize">
</activity>
我在滚动视图中使用了 android:isScrollContainer="false"。
UserRegistration.xml
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:isScrollContainer="false">
....
</ScrollView>
EditText edtPhoneNo = (EditText)findViewById(R.id.mobileno);
edtPhoneNo.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View arg0, MotionEvent arg1) {
edtPhoneNo.bringToFront();
edtPhoneNo.invalidate();
return false;
}
});
小键盘打开时操作栏不应移动,布局不应折叠。
谁能帮我解决这个问题
提前致谢
【问题讨论】:
标签: android android-actionbar android-scrollview android-keypad