日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

android scrollview焦点,scrollview里面的edittext,当它获得焦点时如何滚动到edittext

發布時間:2025/3/11 编程问答 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android scrollview焦点,scrollview里面的edittext,当它获得焦点时如何滚动到edittext 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在scrollview中有一個edittext。 (并且edittext上方的scrollview中還有其他視圖。)

當用戶按下edittext時,鍵盤變得可見,并且scrollview的可見區域變得很小。因為edittext沒有顯示在屏幕上。 (它不會滾動滾動視圖,以便顯示編輯文本。)

在用戶按下鍵盤上的任何鍵后,滾動視圖會滾動,以便edittext再次變為可見。

我如何強制scrollview滾動,以便在用戶按下鍵盤之前edittext會顯示? b>

android:layout_width="fill_parent"

android:layout_height="0dip"

android:layout_weight="1" >

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:layout_weight="1"

android:orientation="vertical"

android:paddingBottom="0dip"

android:paddingLeft="0dip"

android:paddingRight="0dip"

android:paddingTop="0dip" >

layout="@layout/trade_row_item_3cell" />

android:id="@+id/rowQuantity"

layout="@layout/trade_quantity_selection_row_layout" />

layout="@layout/trade_row_item_3cell" />

layout="@layout/trade_price_selection_et_row_layout" />

layout="@layout/trade_row_item_3cell" />

layout="@layout/trade_row_item_3cell" />

style="@style/CustomButtonText"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_gravity="center_horizontal"

android:layout_weight="0" />

layout="@layout/trade_bottom_view" />這是包含edittext的布局(trade_quantity_selection_row_layout)

<?xml version="1.0" encoding="utf-8"?>

android:orientation="horizontal"

android:layout_width="fill_parent"

android:layout_height="50dip"

android:layout_gravity="left"

android:background="@android:drawable/list_selector_background">

android:id="@+id/tvLeft"

android:layout_width="0dip"

android:layout_height="wrap_content"

android:layout_weight="1"

android:singleLine="true"

android:textColor="#000000"

android:paddingLeft="10dip"

android:gravity="center_vertical"

android:layout_gravity="center_vertical"/>

android:id="@+id/etRight"

android:paddingLeft="10dip"

android:background="@null"

android:layout_width="0dip"

android:layout_height="wrap_content"

android:layout_weight="1"

android:inputType="number"

android:gravity="center_vertical"

android:layout_gravity="center_vertical"/>

android:id="@+id/ivRight"

android:src="@drawable/proceed"

android:paddingRight="10dip"

android:layout_weight="0"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_gravity="center_vertical"/>trade_row_item_3cell布局包含帶edittext的線性布局。

總結

以上是生活随笔為你收集整理的android scrollview焦点,scrollview里面的edittext,当它获得焦点时如何滚动到edittext的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。