简体   繁体   English

如何在Android中使用图层

[英]How to use layers in Android

So I have this project in android I'm developing, and right now I have an image of a body diagram. 所以我在开发中的android中有这个项目,现在我有一个人体图的图像。 It includes the heart, stomach, intestine, esophagus, kidneys, liver, and appendix. 它包括心脏,胃,肠,食道,肾脏,肝脏和阑尾。

Basically, I just want to be able to click only on THAT part of the image, (ie. Clicking on the heart) to update the textview I have to say "Heart." 基本上,我只希望能够单击图像的那一部分(即单击心脏)来更新文本视图,我必须说“心脏”。

I downloaded Paint.NET and using the magic wand, I'm able to select a certain part of the body like the heart or stomach. 我下载了Paint.NET,并使用魔术棒选择了心脏或胃等身体的特定部位。 Do I need to create layers in Paint.NET or is this possible in Android using canvas? 我需要在Paint.NET中创建图层还是在Android中使用画布创建图层?

Any help is much appreciated. 任何帮助深表感谢。 Thanks! 谢谢!

You can mark off specific drawing regions with just Canvas. 您可以仅使用画布标记特定的绘图区域。 You'll want to create Paths for each of the anatomical pieces, and create your canvas from there. 您将要为每个解剖图块创建路径 ,并从那里创建画布。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM