GithubHelp home page GithubHelp logo

sajjadintel / animatedgradienttextview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aureldussauge/animatedgradienttextview

1.0 1.0 0.0 254 KB

An Android TextView, using animated color gradients

License: Apache License 2.0

Java 100.00%

animatedgradienttextview's Introduction

alt tag

AnimatedGradientTextView : Color gradients for TextView

This library will allow you to create TextView which uses color gradients and custom fonts.

Changelog

  • v0.0.6

    • Fix crash
  • v0.0.5

    • app:font become app:customFont
    • Add app:maxFPS (define how many times the gradient should refresh each second)

Latest release

The most recent release is v0.0.6, released August 29, 2017

To add a dependency using Gradle, add in your top-level build.gradle:

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

And then add in your app build.gradle :

dependencies {
	compile 'com.github.Mursaat:AnimatedGradientTextView:v0.0.6'
}

Getting started

Firstly, don't forget to add this in your container layout :

xmlns:app="http://schemas.android.com/apk/res-auto"

Here is an exemple using an AnimatedGradientTextView. I just put in my xml layout :

<com.mursaat.extendedtextview.AnimatedGradientTextView
	...
	app:colors="@array/funny_colors"
	app:simultaneousColors="4"
	app:angle="45"
	app:speed="1000"
	app:maxFPS="30"
	app:customFont="BebasNeue.otf" 
	/>

All these parameters are optionals. Some explanations :

  • colors : It must reference an array of colors in res/values/attr.xml, for example :
<?xml version="1.0" encoding="utf-8"?>
<resources>
	...
    <array name="funny_colors">
        <item>@color/materialRed</item>
        <item>@color/materialLime</item>
        <item>@color/materialOrange</item>
        <item>@color/materialPurple</item>
    </array>
</resources>
  • simultaneousColors : The number of colors (of the array) possibly displayed in a same time
  • angle : The angle of the color gradient
  • speed : A number in milliseconds. Increase this number will decrease the gradient move speed
  • customFont : Must be a name of a font located in assets/fonts folder
  • maxFPS : Define how many times the gradient should refresh each second. (Default : 24 FPS)

animatedgradienttextview's People

Contributors

aureldussauge avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.