Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Event Handling in Custom ListViews

Event Handling in Custom ListViews

Put your problem here if it does not fit any of the other categories.

Event Handling in Custom ListViews

Postby Legend » Tue Oct 13, 2009 3:28 pm

I am doing the following: Custom ListView with an ImageView and a TextView. I would like to perform different actions depending on whether an image or a text element was clicked. Now, there are two approaches I can take to perform event handling:

Approach #1: Attach an OnItemClick Listener to an item in the ListView and perform a suitable action.
Problem: It remains in question as to which element (image or text) was clicked. How would I determine this piece of information and then take the necessary action?

Approach #2: Attach an OnClick Listener to the image and text separately inside each listview item and then perform a suitable action.
Problem: I am highly skeptical about the performance of this approach. Added to that, when a click is performed, the row of the item is not being highlighted which makes it highly non-intuitive. How would I make the row highlight in this case?

Any suggestions?
Legend
Junior Developer
Junior Developer
 
Posts: 12
Joined: Tue Sep 29, 2009 1:04 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 16 guests