Android 软键盘显示时如何将scrollView力设置为底部?
我创建了一个Edittext来输入值,并使用android的软键盘来运行它 这是一个XML文件:Android 软键盘显示时如何将scrollView力设置为底部?,android,scrollview,android-softkeyboard,Android,Scrollview,Android Softkeyboard,我创建了一个Edittext来输入值,并使用android的软键盘来运行它 这是一个XML文件: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/RelativeLayoutTalking" android:layout_width="matc
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayoutTalking"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_talk"
android:orientation="vertical" >
<FrameLayout
android:id="@+id/frlayoutChatBar"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:background="#f2f2f2" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/btnAddTalk"
android:layout_width="35dp"
android:layout_height="35dp"
android:background="@drawable/btn_add_talk_activity" />
<Button
android:id="@+id/btbKeyboardTalk"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginLeft="37dp"
android:background="@drawable/icon_keyboard" />
<EditText
android:id="@+id/txtinput_talk"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="75dp"
android:layout_marginRight="70dp"
android:ems="10"
android:textColor="#000000"
android:textSize="14dp" >
<requestFocus />
</EditText>
<Button
android:id="@+id/btnSendTalk"
android:layout_width="60dp"
android:layout_height="35dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@drawable/btn_send_talk_activity" />
</RelativeLayout>
</FrameLayout>
<ScrollView
android:id="@+id/scrollViewChating"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/frlayoutChatBar"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:clickable="true"
android:descendantFocusability="afterDescendants"
android:fillViewport="true" >
<LinearLayout
android:id="@+id/linearLayoutOfScrollTalk"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="10dp" >
</LinearLayout>
</ScrollView>
<FrameLayout
android:id="@+id/frlayoutIconBox"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_alignBottom="@+id/scrollViewChating"
android:layout_marginTop="365dp"
android:background="#f2f2f2" >
<RelativeLayout
android:id="@+id/RelativeLayoutIconBoxView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="20dp" >
<LinearLayout
android:id="@+id/horizontalScrollIconBoxView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="2dp"
android:orientation="vertical" >
<Gallery
android:id="@+id/horizontallistview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="-190dp" />
</LinearLayout>
<FrameLayout
android:id="@+id/frlayoutButtonUnderIconBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageButton
android:id="@+id/imgbtnReloadIconTalk"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/btn_reload_talk" />
</LinearLayout>
</FrameLayout>
</RelativeLayout>
</FrameLayout>
</RelativeLayout>
然后,我必须触摸EditText两次,scrollview将向上移动。但我想触摸一次,scrollview就会向上移动
我怎么做不到
非常感谢任何帮助!谢谢