开发者

Different OnClick actions for subviews in ListView item and fancy context menu bubble

开发者 https://www.devze.com 2023-03-09 23:53 出处:网络
I\'m writing an app and I have a ListView, which items a开发者_开发百科re ImageView and TextView.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消