(RPM) Summary of common problems in the ListView

Source: Internet
Author: User

Original address: http://blog.csdn.net/cherry609195946/article/details/8844224

1. The ListView item in Popwindow gets the solution without clicking the event

1. To have the ListView item get a click event,
Never use Listview.setonitemclicklistener ()
Because the ListView is not getting the focus, how to set it is useless, I have used n many times
To set a click event on the current view in the GetView method in adapter, and use a callback interface to expose the
Activity, so that you can do some operations, note that the interface of the leak if public, adapteritemonclickcallback

2, commented by the friend said:

Popupwindow.setfocusable (TRUE);
Popupwindow.update ();

2. Remove the shadows on both sides of the sliding head

Android:overscrollmode= "Never"

3. Remove the over-zone with two colors:

Android:fadingedge= "None"

4. In the chat client, there is a edittext under the chat interface, when the soft keyboard is open, the contents of the ListView are covered,

Set the following properties: Android:transcriptmode= "Alwaysscroll"

It scrolls the most recent entry in the ListView to the viewable range, and setting normal is sometimes useless,

But it's a big drawback is: pull down to get more messages finished, or as long as you call adapter notify method, it always default to check the last item in the ListView, the ListView setselection is useless;

The workaround is to send a message at the start of the drop, disable it, and wait for the drop to be sent, to enable it in handler Handlemesage,

Why not directly in the drop-down adapter.notify after the completion of the activation of it, try to know. Anyway, my work is not working, so I use handler.

(RPM) Summary of common problems in the ListView

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.