开发者

ImageView, selecting a certain part Android

开发者 https://www.devze.com 2023-03-20 18:55 出处:网络
My vision is this-- I have an image of a human body(like an anatomy chart), and I want the user to be able to click a certain part of it and be able to communicate the body part they have clicked on,

My vision is this-- I have an image of a human body(like an anatomy chart), and I want the user to be able to click a certain part of it and be able to communicate the body part they have clicked on, as in translating it to text... I wonder if this could be possible, and how? Any sample code/redirection to a t开发者_运维知识库utorial would be helpful, or maybe just a practical idea...


A very simple approach is just to add an ImageView to you layout. Override onTouchEvent in the activity to capture touches and then translate the coordinates to texts.

0

精彩评论

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