Open power7714 opened 8 years ago
Here's my layout:
<com.curtrostudios.customspraycantest.SvgImageView android:layout_width="512dp" android:layout_height="512dp" android:id="@+id/imageView2" android:src="@drawable/sketch" app:svg_raw_resource="@raw/custom_svg" android:layout_centerVertical="true" android:layout_centerHorizontal="true" android:scaleType="centerCrop"/>
@power7714 would it be possible to share with me the svg image you used
@MostafaGazar Sorry about the late reply. Here's the svg I was trying to use:
I had uploaded that image to a site online that converts it to svg format so I wouldn't lose the crisp lines.
I've added the classes to my project individually by hand since jitpack isn't working. I've added the SvgImageView to my layout and set the src image and svg image. Nothing set programatically within my main activity. When I run the app, neither the image or svg show. I'm getting "failed to draw image. Invalid float" from the logcat. Look at the end. Here's the logcat:
02-02 02:09:26.431 25127-25127/? I/art: Late-enabling -Xcheck:jni 02-02 02:09:26.921 25127-25164/com.curtrostudios.customspraycantest D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true 02-02 02:09:26.941 25127-25127/com.curtrostudios.customspraycantest D/Atlas: Validating map... 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:26.951 25127-25127/com.curtrostudios.customspraycantest W/Atlas: Pointer 0x0, not in getPreloadedDrawables? 02-02 02:09:27.101 25127-25164/com.curtrostudios.customspraycantest W/Adreno-GSL:: Android framework reported version 2. So, don't force ES30
02-02 02:09:27.101 25127-25164/com.curtrostudios.customspraycantest I/Adreno-EGL: : EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_KK_2.7_RB1.04.04.00.007.018_msm8960_KK_2.7_RB1_CL3869936_release_AU (CL3869936)
OpenGL ES Shader Compiler Version: 17.01.10.SPL
Build Date: 12/09/13 Mon
Local Branch: mybranch2092625
Remote Branch: quic/kk_2.7_rb1.15
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_KK_2.7_RB1.04.04.00.007.018 + NOTHING
02-02 02:09:27.101 25127-25164/com.curtrostudios.customspraycantest I/OpenGLRenderer: Initialized EGL, version 1.4
02-02 02:09:27.111 25127-25164/com.curtrostudios.customspraycantest D/OpenGLRenderer: Enabling debug mode 0
02-02 02:09:27.222 25127-25127/com.curtrostudios.customspraycantest I/art: WaitForGcToComplete blocked for 5.981ms for cause Explicit
02-02 02:09:27.262 25127-25127/com.curtrostudios.customspraycantest I/art: Explicit concurrent mark sweep GC freed 87(28KB) AllocSpace objects, 0(0B) LOS objects, 38% free, 25MB/41MB, paused 824us total 40.439ms
02-02 02:09:27.272 25127-25127/com.curtrostudios.customspraycantest E/BaseImageView: Failed to draw, Id :: 2131558511. Error occurred :: com.curtrostudios.customspraycantest.SVGParseException: java.lang.NumberFormatException: Invalid float: "147.000000pt"
02-02 02:09:27.332 25127-25127/com.curtrostudios.customspraycantest E/BaseImageView: Failed to draw, Id :: 2131558511. Error occurred :: com.curtrostudios.customspraycantest.SVGParseException: java.lang.NumberFormatException: Invalid float: "147.000000pt"
02-02 02:09:27.472 25127-25127/com.curtrostudios.customspraycantest E/BaseImageView: Failed to draw, Id :: 2131558511. Error occurred :: com.curtrostudios.customspraycantest.SVGParseException: java.lang.NumberFormatException: Invalid float: "147.000000pt"
02-02 02:09:27.542 25127-25127/com.curtrostudios.customspraycantest E/BaseImageView: Failed to draw, Id :: 2131558511. Error occurred :: com.curtrostudios.customspraycantest.SVGParseException: java.lang.NumberFormatException: Invalid float: "147.000000pt"
02-02 02:09:27.542 25127-25127/com.curtrostudios.customspraycantest I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@d63094a time:22930766