This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 252
Load Svg from String #65
Comments
No, RichPath doesn't read SVG, you need to convert your SVG to the VectorDrawable format! It's easy to convert your example to VectorDrawable format, here it is 👇 <?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="285dp"
android:height="350dp"
android:viewportWidth="285"
android:viewportHeight="350">
<path
android:fillColor="#FFFFCA8A"
android:pathData="M0.725098 20.775C0.725098 9.78453 9.63483 0.875 20.6251 0.875H194.75L284.3 90.425V329.225C284.3 340.215 275.39 349.125 264.4 349.125H20.6251C9.63483 349.125 0.725098 340.215 0.725098 329.225V20.775Z" />
<path
android:fillColor="#FFAE4E"
android:pathData="M194.75 0.875V70.525C194.75 81.5153 203.66 90.425 214.65 90.425H284.3L194.75 0.875Z" />
</vector> You may already know that, so if your case is different, please explain more and we may find a good idea for your case! |
@tarek360 This SVG content I mentioned comes from my api service as a string. So I have to convert this somehow from string. And also every "evenodd" path has a id. I should give click event in this path. If user click these paths, it will do something with id. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Ex:
I have a kind of SVG content string. Is there any way to load from string to RichPathView?
The text was updated successfully, but these errors were encountered: