Android 滚动视图显示键盘内的编辑文本
我有这个布局Android 滚动视图显示键盘内的编辑文本,android,keyboard,android-edittext,scrollview,Android,Keyboard,Android Edittext,Scrollview,我有这个布局 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:orienta
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" >
</EditText>
<EditText
android:id="@+id/editText2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" />
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
</ScrollView>
</LinearLayout>
…当我执行我的应用程序时,会显示键盘
如果我不使用滚动视图,除非单击一个编辑文本,否则不会发生这种情况
我不想在执行我的应用程序时显示键盘(有滚动视图),除非我单击edittext
有什么想法吗
谢谢 您可以将android:windowSoftInputMode=“stateHidden”放入清单文件的活动标记中