EN / USD
32
of 76
TEP , The Engineering Projects , Image

syedzainnasir

TEP , The Engineering Projects , Rating 7.5 7.5 / 10
TEP , The Engineering Projects , Icon Level: Moderator
TEP , The Engineering Projects , Icon Joined: 20 Mar 2022
TEP , The Engineering Projects , Icon Last Active: 2:21 PM
TEP , The Engineering Projects , Icon Location: TEP , The Engineering Projects , Flag
TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon TEP , The ENgineering Projects , Icon
Android detect which layer is clicked on VectorDrawable
TEP , The Engineering Projects , Calender Question: 09-Mar-2017
TEP , The Engineering Projects , Category In: Computer Software Projects
I have an SVG file which looks like

[img]https://i.stack.imgur.com/7WGBz.png[/img]

When converted through Android Vector Studio, the xml looks like
[code]<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="580dp" android:height="400dp" android:viewportWidth="580.0" android:viewportHeight="400.0"> <path android:name="someName" android:pathData="M0,30a30,30 0,1 0,60 0a30,30 0,1 0,-60 0z" android:strokeColor="#000" android:fillColor="#fff" android:strokeWidth="1.5"/> <path android:name="someOtherName" android:pathData="M60,100a40,40 0,1 0,80 0a40,40 0,1 0,-80 0z" android:strokeColor="#000" android:fillColor="#000" android:strokeWidth="1.5"/> </vector>[/code] When any of the circles or paths of this vector are clicked, I want to know which layer or circle has been clicked. I could not find any method which will let me know that there are two layers or which layer has been clicked.

From this answer it looks like getting inner elements of a VectorDrawable is not possible. So is there any way I can get to know exactly which circle/layer is clicked?
TEP , The Engineering Projects , Icon Answer: 0 TEP , The Engineering Projects , Icon Views: 150 TEP , The Engineering Projects , Icon Followers: 85
Small Bio
TEP , The Engineering Projects , Tags
PLC
Robot
STM32
Arduino
AI
ESP32
Ladder Logic
PLC Projects
Programming
Communicates STM32
PLC Projects
Communicates PLC
Font Style
Alignment
Indenting and Lists
Insert Media
Insert Items

Want to leave an answer!

Word Count :0 Draft Saved at 12:42 am.