All Projects β†’ tarek360 β†’ Richpath

tarek360 / Richpath

πŸ’ͺ Rich Android Path. 🀑 Draw as you want. πŸŽ‰ Animate much as you can.

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Richpath

Mega Doodles Pack
πŸ”₯ Big vector pack with hand-drawn doodles for presentations, social media, blog posts and so on
Stars: ✭ 258 (-88.58%)
Mutual labels:  vector, svg, icons
Vectorlogozone
3,000+ gorgeous SVG logos, perfect for your README or credits page
Stars: ✭ 239 (-89.42%)
Mutual labels:  vector, svg, icons
Aegis Icons
Unofficial 2FA entry icons for open source Android authenticator Aegis
Stars: ✭ 153 (-93.23%)
Mutual labels:  vector, svg, icons
Feathericon
simply generic vector icon collection - including sketch file, svg files, and font files.
Stars: ✭ 178 (-92.12%)
Mutual labels:  vector, svg, icons
Circle Flags
A collection of 300+ minimal circular SVG country flags
Stars: ✭ 139 (-93.85%)
Mutual labels:  svg, icons
Glyphs
A dynamic design system for managing large icon sets in Figma and using them on the web
Stars: ✭ 140 (-93.8%)
Mutual labels:  svg, icons
Coreui Icons
CoreUI Free Icons - Premium designed free icon set with marks in SVG, Webfont and raster formats
Stars: ✭ 1,813 (-19.74%)
Mutual labels:  svg, icons
Faviator
A simple easy favicon generator.
Stars: ✭ 155 (-93.14%)
Mutual labels:  svg, icons
Svg To Ts
Build performant SVG icon libraries by converting raw SVG files to TypeScript that is optimized for modern tree shaking mechanisms.
Stars: ✭ 131 (-94.2%)
Mutual labels:  svg, icons
Wechart
Create all the [ch]arts by cax or three.js - Cax ε’Œ three.js εˆ›ι€ δΈ€εˆ‡ε›Ύ[葨]
Stars: ✭ 152 (-93.27%)
Mutual labels:  path, svg
Vue Eva Icons
Is a pack of more than 480 beautiful open source Eva icons as Vue components
Stars: ✭ 189 (-91.63%)
Mutual labels:  svg, icons
Styled Icons
πŸ’… Popular icon packs like Font Awesome, Material Design, and Octicons, available as React Styled Components
Stars: ✭ 1,878 (-16.87%)
Mutual labels:  svg, icons
React Designer
It's not art
Stars: ✭ 1,762 (-22%)
Mutual labels:  vector, svg
Plutovg
Tiny 2D vector graphics library in C
Stars: ✭ 141 (-93.76%)
Mutual labels:  vector, svg
Rmdi
React Material Design Icons – built with Pixo, Styled Components, and Styled System
Stars: ✭ 132 (-94.16%)
Mutual labels:  svg, icons
Materialdesign Svg
@mdi/svg Dist for Material Design Icons.
Stars: ✭ 166 (-92.65%)
Mutual labels:  svg, icons
Animatedsvgview
Animated SVG Drawing for Android
Stars: ✭ 1,927 (-14.7%)
Mutual labels:  svg, vector-drawable
File Icon Vectors
A collection of file type icons in SVG format
Stars: ✭ 171 (-92.43%)
Mutual labels:  svg, icons
Svgiconimagelist
Three engines to render SVG (GDI+, Direct2D or Cairo) and four components to simplify use of SVG images (resize, fixedcolor, grayscale...): TSVGIconImage, TSVGIconImageCollection, TSVGIconVirtualImageList and TSVGIconImageList (for VCL and FMX).
Stars: ✭ 127 (-94.38%)
Mutual labels:  svg, icons
Php badge
This is an identification tag based on SVG, It can quickly generate various labels and status identifiers
Stars: ✭ 101 (-95.53%)
Mutual labels:  svg, icons

*** Library maintenance is paused until further notice! ***

CircleCI Release API Twitter URL

πŸ’ͺ Rich Android Path. 🀑 Draw as you want. πŸŽ‰ Animate much as you can.

Download sample app:

Features

  • Full Animation Control on Paths and VectorDrawables: Animate any attribute in a specific path in the VectorDrawable

fillColor, strokeColor, strokeAlpha, fillAlpha, size, width, height, scale, scaleX, scaleY, rotation, translationX, translationY, trimPathStart, trimPathEnd, trimPathOffset.

  • Path morphing:

RichPathAnimator.animate(richPath)
       .pathData(pathData1, pathData2, ...)
       .start();

Just 3 Steps to Animate any path.

1. In your layout.

    <com.richpath.RichPathView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:vector="@drawable/vector_drawable" />

2. Find your richPath.

// by path name
RichPath richPath = richPathView.findRichPathByName("path_name");
// or if it contains one path
RichPath richPath = richPathView.findFirstRichPath();
// or by index
RichPath richPath = richPathView.findRichPathByIndex(0);

3. Use the RichPathAnimator to animate your richPath.

RichPathAnimator.animate(richPath)
       .trimPathEnd(value1, value2, ...)
       .fillColor(value1, value2, ...)
       .start();

Example

notification icon vector drawable

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="32dp"
    android:height="32dp"
    android:viewportHeight="32.0"
    android:viewportWidth="32.0">

    <group
        android:pivotX="16"
        android:pivotY="6.25">
        <path
            android:name="top"
            android:fillColor="#FFF7F7F7"
            android:pathData="M22,19.8v-5c0-3.1-1.6-5.6-4.5-6.3V7.8c0-0.8-0.7-1.5-1.5-1.5s-1.5,0.7-1.5,1.5v0.7c-2.9,0.7-4.5,3.2-4.5,6.3v5l-2,2v1h16v-1L22,19.8z" />

        <path
            android:name="bottom"
            android:fillColor="#FFF7F7F7"
            android:pathData="M16,25.8c1.1,0,2-0.9,2-2h-4C14,24.9,14.9,25.8,16,25.8z" />
    </group>
</vector>

XML

    <com.richpath.RichPathView
        android:id="@+id/ic_notifications"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:vector="@drawable/ic_notifications" />

Java

RichPath top = notificationsRichPathView.findRichPathByName("top");
RichPath bottom = notificationsRichPathView.findRichPathByName("bottom");

RichPathAnimator.animate(top)
        .interpolator(new DecelerateInterpolator())
        .rotation(0, 20, -20, 10, -10, 5, -5, 2, -2, 0)
        .duration(4000)
        .andAnimate(bottom)
        .interpolator(new DecelerateInterpolator())
        .rotation(0, 10, -10, 5, -5, 2, -2, 0)
        .startDelay(50)
        .duration(4000)
        .start();

Installation

Add the following dependency to your module build.gradle file:

dependencies {
	...
	implementation 'com.github.tarek360.RichPath:animator:0.1.1'
}

Add this to your root build.gradle file (not your module build.gradle file) :

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

More Control by the RichPathAnimator

  • Animate multiple paths sequentially or at the same time
RichPathAnimator
       .animate(richPath1, richPath2)
       .rotation(value1, value2, ...)

       //Animate the same path or another with different animated attributes.
       .andAnimate(richPath3)
       .scale(value1, value2, ...)

       //Animate after the end of the last animation.
       .thenAnimate(richPath4)
       .strokeColor(value1, value2, ...)

       // start your animation πŸŽ‰
       .start();
  • Which one of the paths is clicked?
richPathView.setOnPathClickListener(new RichPath.OnPathClickListener() {
    @Override
    public void onClick(RichPath richPath) {
       if (richPath.getName().equals("path_name")) {
           //TODO do an action when a specific path is clicked.
       }
    }
});

TODO

  • Clickable path (Done)
  • Support clip-path
  • Path animation (animate a RichPath on a path)
  • Reverse animation
  • ...

If you have any suggestion please open an issue for it.

Credits

  • florent37 He is the creator of ViewAnimator which gave me the idea of this project. Some core concepts and ideas were reused, but everything is written from scratch.
  • Android Some code is reused form the android source code and the VectorDrawableCompat support library.
  • Alex Lockwood The paths of the morphing sample is extracted from the Shape Shifter demo.

Developed By

License

Copyright 2017 Tarek360

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].