0

Hi I want to draw line and text to an human image for captioning each part of a human body. I have imageview in android to show human body, can anyone give me a idea to do this.

Nandhu
  • 68
  • 11
  • you want to draw lines and text using canvas or want to display it inside xml ? -@Nandhu – Radhey Feb 18 '16 at 06:21
  • I want to draw in canvas at runtime because the image will change at runtime like head, leg or chest. – Nandhu Feb 18 '16 at 06:45
  • refer this , you can find another 2 links there, here I was drawn arc, lines, text etc stuff using canvas ,http://stackoverflow.com/questions/28690202/android-canvas-drawbitmap-method-not-working-properly – Radhey Feb 18 '16 at 06:48

1 Answers1

0

Yep, it is simple.

Over the ImageView add a Linear Layout, and you have to place in that weightSum = 3 ( head, arms, legs), this way you are making a childs that covers those areas.

Also for example the hands, divide the child in 3 more childs like, so the one on the left is covering the left arm, the one in the middle is covering the body, and on the = right child the right arm. And after that place in them the TextView according to the body part.

I did this for a TV Remote, and it worked perfect.