Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MartinHY/PathDraw

Repository files navigation

PathDraw

It`s a android animation that drawing with svg .

Thanks https://github.com/geftimov/android-pathview

this library is base on android-pathview

I removed the parallel animation and modified the fill animation .it will be like that:

woman

sttr:

 <declare-styleable name="PathDrawingView">
 <attr name="path" format="reference"></attr>
 <attr name="draw_paint" format="boolean"></attr>
 <attr name="paint_color" format="color"></attr>
 <attr name="filling" format="boolean"></attr>
 <attr name="fill_after" format="boolean"></attr>
 </declare-styleable>

Three modes

1.NORMAL

ironman

add the code in your xml:

 <com.martin.pdmaster.PathDrawingView
 android:id="@+id/pathdrawing"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 app:draw_paint="true"
 app:path="@raw/ironman"></com.martin.pdmaster.PathDrawingView>

2.FILL

nancy

add the code in your xml:

 <com.martin.pdmaster.PathDrawingView
 android:id="@+id/pathdrawing"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 app:draw_paint="true"
 app:fill_after="false"
 app:filling="true"
 app:paint_color="@color/colorPrimary"
 app:path="@raw/nancypath3"></com.martin.pdmaster.PathDrawingView>

3.AFTER FILL

afterfill

add the code in your xml:

 <com.martin.pdmaster.PathDrawingView
 android:id="@+id/pathdrawing"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 app:draw_paint="true"
 app:fill_after="true"
 app:paint_color="#000000"
 app:path="@raw/monitor"></com.martin.pdmaster.PathDrawingView>

There is only sequential animation in this library

 pathDrawingView.getSequentialPathAnimator().delay(200).duration(5000).start();

**ADD THE LIBRARY **

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Step 2. Add the dependency

dependencies {
 compile 'com.github.MartinBZDQSM:PathDraw:1.1'
}

##BLOG

##License

Copyright [2016] [MartinBZDQSM of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

It`s a android animation that drawing with svg .

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /