当前位置:网站首页>When the soft keyboard appears, it makes my EditText field lose focus
When the soft keyboard appears, it makes my EditText field lose focus
2022-06-29 07:12:00 【Rich in starch】
problem :
I've got a few EditText fields in a ListView. I am here ListView Some of them are EditText Field .When I tap on one of the EditText fields, the keyboard slides into view (as it should), but the EditText field I tapped loses focus. When I click EditText One of the fields , The keyboard slides into the view ( It should be ), But I clicked EditText Field loses focus .I've tried using various InputMethodManager methods to make the keyboard start out in view (in order to get around the problem rather than truly solve it), but that didn't work - the keyboard was not in view when the Activity appeared. I try to use a variety of InputMethodManager Method to start the keyboard in the view ( To solve the problem rather than really solve it ), But it doesn't work - When Activity The keyboard is not in view when it appears .
The EditText's type is number , and when the keyboard is sliding in, it is a number keyboard, but when it finishes sliding and the EditText loses focus, it changes to the alphabetical keyboard (which reinforces the idea that the EditText no longer has focus).EditText The type is number , When the keyboard slides in , It is a numeric keypad , But when it finishes sliding and EditText When you lose focus , It becomes an alphabetic keyboard ( This strengthens EditText The idea that there is no longer a focus ) .
My questions are these: My question is these :
1) How can I make the selection of my EditText field and the subsequent sliding in of the soft keyboard not make my EditText lose focus?1) How to make my EditText Field selection and subsequent slide in of the soft keyboard Can't Make my EditText Lose focus ?
... failing that...…… failed ……
2) How can I make the keyboard start out in view so it never has to slide in (thus avoiding the behavior I find so objectionable)?2) How can I get the keyboard to start from the field of view , So it doesn't have to slide in ( So as to avoid the behavior that I find so disgusting )?
My manifest does include android:windowSoftInputMode="stateAlwaysVisible" , but the keyboard does not appear until I tap on an EditText. My list does include android:windowSoftInputMode="stateAlwaysVisible" , But when I click EditText The keyboard will not appear before .This ignoring of the 'stateAlwaysVisible' attribute seems to only occur in the emulator - on my provisioned device, it is honored so question number 2 above does work on the device... but not in the emulator. This pair 'stateAlwaysVisible' The omission of attributes seems to occur only in the simulator - On my configured device , It's an honor , So the question above 2 It does apply to equipment ...... But not for simulators .
Thanks for any help you can provide! Thank you for any help , You can provide !
Solution :
Reference resources : https://stackoom.com/en/question/NYpY边栏推荐
- NoSQL数据库介绍
- [answer all questions] CSDN question and answer function evaluation
- QT foreach keyword
- idea使用
- [translation] [Chapter 2 ②] mindshare PCI Express technology 3.0
- Redis in NoSQL database (4): redis publishing and subscription
- What is the difference between software engineer and software development? What is the difference between software engineer and software developer?
- VerilogA——动态比较器
- Tree drop-down selection box El select combined with El tree effect demo (sorting)
- 关于DDNS
猜你喜欢

Ci tool Jenkins II: build a simple CI project

Configuring the flutter development environment

json tobean

IDEA 集成 码云

The realization of changing pop-up background at any time

UVM验证平台

Idea integrated code cloud

UVM authentication platform

转:侯宏:企业数字化转型的关键不是技术,而是战略

Creating a new generation of production and service tools with robot education
随机推荐
Flutter is configured with a domestic image and connected to the real machine
多模态 —— Learnable pooling with Context Gating for video classification
Qt 容器类
WDCP accesses all paths that do not exist and jumps to the home page without returning 404
NoSQL数据库之Redis(四):Redis新数据类型
Li Kou today's question -324 Swing sort II
YGG cooperated with Web3 platform leader to empower the creative community with Dao tools and resources
IDEA 集成 码云
Configuring the flutter development environment
As a qualified network worker, you must master DHCP snooping knowledge!
Daily question - force deduction - multiply the found value by 2
Multimodal learning pooling with context gating for video classification
The realization of changing pop-up background at any time
Introduction to Ceres Quartet
Ribbon service invocation and load balancing
YGG pilipinas: typhoon Odette disaster relief work update
WDCP访问不存在的路径全部跳转到首页不返回404的解决办法
How to do the performance pressure test of "Health Code"
Object detection - VIDEO reasoning using yolov6
Crawler data analysis (introduction 2-re analysis)