Android TextField : set focus + soft input programmatically
2024-09-04 10:21:18
Good sir, try this:
edittext.setFocusableInTouchMode(true);
edittext.requestFocus();
Im not sure, but this might be required on some phones (some of the older devices):
finalInputMethodManager inputMethodManager =(InputMethodManager) context
.getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.showSoftInput(edittext,InputMethodManager.SHOW_IMPLICIT);
http://stackoverflow.com/questions/8080579/android-textfield-set-focus-soft-input-programmatically
最新文章
- es6 static
- windows下最好的豆瓣fm软件——K.F.storm豆瓣电台,没有之一
- DB2 SQL Mixed data in character strings
- JavaScript 2016年的概况
- HTML&;CSS----练习(运算符)
- 4.2 spring-import 标签的解析;
- ARCproject中加入非ARC文件,或者非ARC环境中加入ARC文件
- GCC使用
- 2017-2018-1 1623 bug终结者 冲刺007
- Python3 与 C# 并发编程之~ 进程篇
- 自学Python4.4-装饰器的进阶
- 使用 Maven 插件将 class(字节码文件),resource(资源文件),lib(依赖的jar包)分开打包
- 11.14 Daily Scrum
- 记一次Win Server 2012部署问题及解决方法
- IIS开多个HTTPS站点
- 2018.09.09 bzoj4403: 序列统计(Lucas定理)
- elasticsearch Geo Distance Query
- day 45 Django 的初识2 路由层,视图层,模板层
- centos7下搭建JAVA项目运行环境。 JAVA+MYSQL+TOMCAT+NGINX
- Spring Cloud Eureka的基础架构