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相关推荐
- Android通过读取AndroidManifest里面的meta-data获取参数
如题,在AndroidManifest里面的meta-data里面配置: <application><meta-dataandroid:name="TTAPPID" ...
- Android项目 匹配Text里面的Emoji 和 QQ表情
吐槽:第一次写博客,新手一枚.写这个博客为了共享一下资源,大家相互学习,最主要目的是抛砖引玉,引大婶指高见. 前言:需求是这样的,搞聊天,而且是在一个字库里面没有emoji的android系统里面搞. ...
- android module 引用libs里面的so文件_Android中的JNI开发,你了解多少?
一,什么是任务及管理 任务是用户在执行某项工作时与之互动的一系列 Activity 的集合. 一.步骤,修改build.gradle,添加cmakelists,写JNI接口,写c++,这个是不是流水线 ...
- 关于新建android项目,MainActivity里面的onCreate()方法、R文件报错的解决方法
做为一位刚刚上手Android开发的小白来说,要适应一门开发语言和一款开发工具十分费劲.本人也在摸索的路上走了很多的弯路,也有了一点点的经验和问题的解决方案,和大家分享一下. 这是关于第一次用Andr ...
- Android之解决JsonObject里面的JsonArray数据会有斜杠问题
1.问题 本地保存了多个json格式的字符串 {"event":"sdk_ad_request_status","timestamp":16 ...
- Android 如何实现带滚动条的TextView,在更新文字时自动滚动到最后一行
1.主布局代码: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns ...
- [Android] (在ScrollView里嵌套view)重叠view里面的onTouchEvent的调用方法
在我前面的自定义裁剪窗口的代码中,我把裁剪的view放在了大的scrollview里,这样就出现了程序只能触发scrollview,无法操作我的裁剪窗口.所以我加了那篇博客下面最后两段代码.其实我遇到 ...
- Android UI系列-----ScrollView和HorizontalScrollView
本篇随笔将讲解一下Android当中比较常用的两个布局容器--ScrollView和HorizontalScrollView,从字面意义上来看也是非常的简单的,ScrollView就是一个可以滚动的V ...
- 在android中ScrollView嵌套ScrollView解决方案
文章转载自:http://www.jb51.net/article/33054.htm 大家好,众所周知,android里两个相同方向的ScrollView是不能嵌套的,那要是有这样的需求怎么办,接下 ...
最新文章
- 小测一下fastjson的速度(纯娱乐)
- Jquery真的很棒
- ffmpeg连接超时与解码超时
- 自学python语言-自学Python1.1-简介
- xml python2.6_如何使用前缀选项解析python 2.6中的参数为-f file.xml
- tensorflow padd
- AQS.accquire
- windows效率工具,翻译软件QTranslate
- server sql 多表事物 自增id_最实用的 SQL 语句收藏,程序员看完这篇就够了!
- CCF NOI1118 序列第K小
- 练习:编写循环,让用户输入内容,判断输入的内容以alex开头的,则将该字符串加上_SB结尾...
- python进阶例题
- 动量法与指数加权移动平均
- 中国止血分析仪行业市场供需与战略研究报告
- 三阶金字塔魔方还原 - 3步无公式
- 乔巴机器人 番外篇_超神学院之暮光之眼
- CityEngine中如何导出带有属性信息的slpk
- xcode6.3 ineligible devices解决方法
- 安装rabbitMQ出现plugin configuration unchanged
- Docker 快速上手学习入门教程 1
热门文章
- linux 命令 空格转义,在Linux中,如何转义SCP复制路径中的空格?
- [2020-AAAI] Revisiting Image Aesthetic Assessment via Self-Supervised Feature Learning 论文简析
- mysql ubuntu 17.04_1、mysql 5.7 ubuntu17.04
- mysql 导入.sql文件_MySQL导入.sql文件及常用命令
- java第四次上机作业_第十java上机作业
- ffmpeg运行在服务器上,FFMPEG安装在服务器上
- linux将视频导入到iphone,如何将 IPhone 的文件导入 Linux
- 设置linux拨号服务端,CentOS Linux上搭建PPPoE服务器及拨号设置
- 向上传文件服务器,向服务器上传文件
- 在c语言程序中 对文件进行操作首先要,《C语言程序设计》试题八及答案