Different OnClick actions for subviews in ListView item and fancy context menu bubble
I'm writing an app and I have a ListView, which items a开发者_开发百科re ImageView and TextView. I'd like to determine whether user have clicked the icon or the text to handle diferrent actions for each case. I want to achieve similar effect like in stock contacts app.
First question: How to achieve the effect wich I've mentioned above?
Second question: In the stock contacts app when we click on a photo, a fancy bubble with some actions inside appears. How is it called? Where to get it from?
Thanks.
(edit) ok, i've found something according to my second question: How to make a fancy transparent menu like the "share menu" in Android gallery?
The answer on your first question: you should attach onClickListeners
to each of your row's views in your Adapter's getView()
method. This should do it.
精彩评论