Softwindow键盘隐藏了edittext

时间:2013-01-16 18:15:27

标签: android android-layout

我正在使用具有10个editext字段的布局充气器来扩充布局,当我点击edittext软键盘隐藏编辑文本时如果我没有膨胀布局并放置在setcontentview中它工作正常。如果使用膨胀布局的put requestfocus标记使应用程序崩溃。请找到以下代码并帮我解决此问题。

JAVA CODE

LayoutInflater inflater = LayoutInflater.from(this);
scrollView = (MyHorizontalScrollView) 
inflater.inflate(R.layout.horz_scroll_with_list_menu, null);
setContentView(scrollView);// if i comment this and add inflatelayout SetContentView(R.layout_details) works fine.

menu = inflater.inflate(R.layout.horz_scroll_menu, null);
app = inflater.inflate(R.layout.details, null);//

1 个答案:

答案 0 :(得分:0)

您可能需要更改清单(对于您的活动)中的属性来处理此问题。将此行放在AndroidManifest.xml中(在用于定义活动的标记内)

android:windowSoftInputMode="adjustResize"
相关问题