{"action":"created","issue":{"url":"https://api.github.com/repos/jaredrummler/AnimatedSvgView/issues/6","repository_url":"https://api.github.com/repos/jaredrummler/AnimatedSvgView","labels_url":"https://api.github.com/repos/jaredrummler/AnimatedSvgView/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/jaredrummler/AnimatedSvgView/issues/6/comments","events_url":"https://api.github.com/repos/jaredrummler/AnimatedSvgView/issues/6/events","html_url":"https://github.com/jaredrummler/AnimatedSvgView/issues/6","id":164653768,"number":6,"title":"AnimatedSvgView not display center on the screen","user":{"login":"Vishal12796","id":16622772,"avatar_url":"https://avatars.githubusercontent.com/u/16622772?v=3","gravatar_id":"","url":"https://api.github.com/users/Vishal12796","html_url":"https://github.com/Vishal12796","followers_url":"https://api.github.com/users/Vishal12796/followers","following_url":"https://api.github.com/users/Vishal12796/following{/other_user}","gists_url":"https://api.github.com/users/Vishal12796/gists{/gist_id}","starred_url":"https://api.github.com/users/Vishal12796/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vishal12796/subscriptions","organizations_url":"https://api.github.com/users/Vishal12796/orgs","repos_url":"https://api.github.com/users/Vishal12796/repos","events_url":"https://api.github.com/users/Vishal12796/events{/privacy}","received_events_url":"https://api.github.com/users/Vishal12796/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-07-09T06:52:57Z","updated_at":"2016-08-23T15:38:57Z","closed_at":"2016-07-09T08:12:05Z","body":"AnimatedSvgView not display center on the screen\r\n\r\n```xml\r\n<FrameLayout    xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"fill_parent\"\r\n    android:id=\"@+id/rl\"\r\n    android:background=\"@mipmap/back2\" >\r\n\r\n    <RelativeLayout\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_gravity=\"center\"\r\n        android:layout_centerVertical=\"true\"\r\n        android:layout_centerHorizontal=\"true\" >\r\n\r\n        <com.jrummyapps.android.widget.AnimatedSvgView\r\n            android:id=\"@+id/animated_svg_view\"\r\n            android:layout_width=\"100dp\"\r\n            android:layout_height=\"100dp\"\r\n            android:layout_gravity=\"center\"\r\n            app:paddingEnd=\"@dimen/activity_horizontal_margin\"\r\n            app:animatedSvgFillColors=\"@array/os_colors\"\r\n            app:animatedSvgGlyphStrings=\"@array/os_strings\"\r\n            app:animatedSvgImageSizeX=\"400\"\r\n            app:animatedSvgImageSizeY=\"400\"\r\n            app:animatedSvgFillStart=\"1200\"\r\n            app:animatedSvgFillTime=\"1000\"\r\n            app:animatedSvgTraceTime=\"2000\"\r\n            app:animatedSvgTraceTimePerGlyph=\"1000\" />\r\n\r\n    </RelativeLayout>\r\n\r\n</FrameLayout>\r\n```"},"comment":{"url":"https://api.github.com/repos/jaredrummler/AnimatedSvgView/issues/comments/241775173","html_url":"https://github.com/jaredrummler/AnimatedSvgView/issues/6#issuecomment-241775173","issue_url":"https://api.github.com/repos/jaredrummler/AnimatedSvgView/issues/6","id":241775173,"user":{"login":"PGMacDesign","id":6592650,"avatar_url":"https://avatars.githubusercontent.com/u/6592650?v=3","gravatar_id":"","url":"https://api.github.com/users/PGMacDesign","html_url":"https://github.com/PGMacDesign","followers_url":"https://api.github.com/users/PGMacDesign/followers","following_url":"https://api.github.com/users/PGMacDesign/following{/other_user}","gists_url":"https://api.github.com/users/PGMacDesign/gists{/gist_id}","starred_url":"https://api.github.com/users/PGMacDesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PGMacDesign/subscriptions","organizations_url":"https://api.github.com/users/PGMacDesign/orgs","repos_url":"https://api.github.com/users/PGMacDesign/repos","events_url":"https://api.github.com/users/PGMacDesign/events{/privacy}","received_events_url":"https://api.github.com/users/PGMacDesign/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T15:38:57Z","updated_at":"2016-08-23T15:38:57Z","body":"@samy-baili  sort of, basically, the issue was that I was setting the X and Y values in the XML , but I was not setting them the correct number. \r\n\r\nThe xml tags:\r\n\r\n        lib:animatedSvgImageSizeX=\"770\"\r\n        lib:animatedSvgImageSizeY=\"508\"\r\n\r\nNeed to match the svg as defined in your actual SVG file. \r\nhttp://screencloud.net/v/9c8m\r\n\r\nMine still wasn't centering perfectly so I asked our graphic artist to actually center the SVG using an SVG editor tool, then re-opened it and pulled the width and height you see in that xml code above. \r\nIf you try and pull an image from something that does not have the image centered, it will not center no matter how you try. \r\n\r\nSo in short, steps are:\r\n1) Make sure image is centered in svg first. IE, like this:  http://screencloud.net/v/3A8I and not multiple images in the same one (IE like this, http://screencloud.net/v/w36Y )\r\n2) Get the SVG dimensions via by opening up the svg image in a text editor (IE Notepad++) and use the width as the X coord and the height as the Y coord. \r\n3) And it should run from there as long as the height and width match the xml."}}
{"actor":{"display_login":"PGMacDesign"}}