Android cancels EditText auto get default focus

Recently, in the new contact = in the address book, EditText will automatically get the focus as soon as you enter a page. It's very depressed. How can EditText not get the focus automatically?

So how do I cancel this default behavior?

I've been looking online for a long time. I listen to soft keyboard events and call the clearcause () method, but I haven't tested it! The corresponding attribute cannot be found in the XML. You can turn off this default behavior

Solution: find one in the parent control of EditText and set it to

demo.xml:

The above is the whole content of this article. I hope the content of this article can bring some help to your study or work. At the same time, I also hope to support a lot of programming tips!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>