In the soft keyboard pop-up, the listview is moved up and rolled to the last one. How can this problem be solved?

Source: Internet
Author: User

This problem occurs during project creation. There is a page similar to the dialog interface. When you click the text box below to bring up a soft keyboard, you need to move the listview up and slide to the last one, at the beginning, the solution was to listen to textwatcher of edittext. In the beforetextchanged method squadron listview, the solution was as follows:

Handler. postdelayed (New runnable (){
@ Override
Public void run (){
// Todo auto-generated method stub
Chatlistview. setselection (lists. Size ()-1 );
}

},300 );

This processing method is OK in most mobile phones, but in the Chinese Input Method of Samsung mobile phones,Beforetextchanged is not listened to by clicking the keyboard, but by clicking the input text to edittext. There is still a problem.

In fact, it is very easy to solve this problem. You only need to set the attribute of listview to Android: transcriptmode = "normal. Record it here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.