question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AnimatedSvgView not display center on the screen

See original GitHub issue

AnimatedSvgView not display center on the screen

<FrameLayout    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="fill_parent"
    android:id="@+id/rl"
    android:background="@mipmap/back2" >

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true" >

        <com.jrummyapps.android.widget.AnimatedSvgView
            android:id="@+id/animated_svg_view"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_gravity="center"
            app:paddingEnd="@dimen/activity_horizontal_margin"
            app:animatedSvgFillColors="@array/os_colors"
            app:animatedSvgGlyphStrings="@array/os_strings"
            app:animatedSvgImageSizeX="400"
            app:animatedSvgImageSizeY="400"
            app:animatedSvgFillStart="1200"
            app:animatedSvgFillTime="1000"
            app:animatedSvgTraceTime="2000"
            app:animatedSvgTraceTimePerGlyph="1000" />

    </RelativeLayout>

</FrameLayout>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jaredrummlercommented, Jan 16, 2017

@HenriqueMonte It looks like this SVG is checkbox-marked-circle-outline from https://materialdesignicons.com I’ve had problems with path data from those icons too. In the past I have opened the SVG in Adobe Illustrator and copied over the path to a new artboard and the path data was updated and worked correctly. I can’t seem to get this SVG working either but I only spent about 5 minutes on it. I’m not sure what is going on and I don’t have the time at the moment to investigate. Try using another SVG or recreating it in Adobe Illustrator or similar software.

0reactions
HenriqueMontecommented, Jan 17, 2017

@jaredrummler Thank you for your answer! I spent a couple of hours trying to fix this, and this was the solution. I imported the SVG (yes, it is from https://materialdesignicons.com) to Inkscape. I changed the canvas area from 24 to 96 and export the SVG. The path generated was completely different and now it’s working like a charm!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Align svg to center of screen [duplicate] - Stack Overflow
Try CSS: #svgMain {margin-left:auto; margin-right:auto; display:block;}.
Read more >
jaredrummler/AnimatedSvgView: Animated SVG Drawing for ...
Play the animation: AnimatedSvgView svgView = (AnimatedSvgView) findViewById(R. id. animated_svg_view); svgView.
Read more >
android-sliding-layer-lib Alternatives - Android Other Widget | LibHunt
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android...
Read more >
css3 radial gradient animation :: back soft
Vote count: 0I've been searching on many posts but almost all of them are confusing.I'm working with animate.css into a which is at...
Read more >
tools:replace="android:appComponentFactory" android ...
CoreComponentFactory" about animatedsvgview HOT 6 OPEN. shenbuqingyun avatar ... HOT 2; animated · AnimatedSvgView not display center on the screen HOT 12 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found