Android 键盘上方按钮下方的自动增长编辑文本
android还有一个同样的问题,它让开发者发疯! 我想做键盘上方的按钮 以下是我的xml:Android 键盘上方按钮下方的自动增长编辑文本,android,android-layout,Android,Android Layout,android还有一个同样的问题,它让开发者发疯! 我想做键盘上方的按钮 以下是我的xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/home" android:layout_width="910dp" android:layout_height="wrap_content" android:focusab
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/home"
android:layout_width="910dp"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
android:keepScreenOn="true"
android:orientation="vertical"
android:padding="15dip" >
<com.custom.webview
android:id="@+id/webView1"
android:layout_width="900dp"
android:layout_height="350dp"
android:visibility="gone" >
</com.custom.webview>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:paddingBottom="5dip"
android:paddingTop="20dip"
android:text="@string/choose_the_outcome"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="25sp" />
<Spinner
android:id="@+id/spinner1"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:entries="@array/call_outcomes" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:paddingBottom="5dip"
android:paddingTop="20dip"
android:text="@string/notes"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="25sp" />
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:fontFamily="sans-serif-light"
android:inputType="textMultiLine" >
</EditText>
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="25dip" >
<Button
android:id="@+id/button1"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:onClick="onCancel"
android:text="@android:string/cancel" />
<Button
android:id="@+id/button2"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:onClick="onSave"
android:text="@string/save" />
</LinearLayout>
</LinearLayout>
只要将所有布局移动到相对位置即可。这可能会解决一个问题。只需将所有布局移动到相对位置即可。它可能会解决问题。添加此行
android:windowSoftInputMode="adjustResize|stateHidden"
在AndroidManifest.xml
标记中添加此行
android:windowSoftInputMode="adjustResize|stateHidden"
要访问AndroidManifest.xml
标记,您需要执行以下操作:
只需将文本视图作为微调器的子视图
或放置文本视图高度=包裹内容。您需要执行以下操作: 只需将文本视图作为微调器的子视图
或放置文本视图高度=包裹内容。问题是EditText未微调器+文本视图问题是EditText未微调器+文本视图此结果如下:在webview下方无法看到任何内容此结果如下:在webview下方无法看到任何内容