revely-inc / Co.revely.gradient
Licence: wtfpl
An Android library for easy gradient management
Stars: ✭ 298
Programming Languages
kotlin
9241 projects
Projects that are alternatives of or similar to Co.revely.gradient
Ratifier
Ratifier is a form validation library for Android.
Stars: ✭ 123 (-58.72%)
Mutual labels: library, easy-to-use
Hacktoberfest 2020
Welcome to Open-source! Simply add your details to contributors | Repo for Hacktoberfest 2020 ✅
Stars: ✭ 621 (+108.39%)
Mutual labels: opensource, easy-to-use
Gradstop
JavaScript micro library to generate gradient color stops 🏳️🌈
Stars: ✭ 144 (-51.68%)
Mutual labels: library, gradient
Angular Open Source Starter
This is a starter project for creating open-source libraries for Angular. It is a full fledged Angular workspace with demo application and easy library addition. It is designed to be used for open-sourcing libraries on Github and has everything you'd need ready for CI, code coverage, SSR testing, StackBlitz demo deployment and more.
Stars: ✭ 120 (-59.73%)
Mutual labels: opensource, library
Vulkan2drenderer
Easy to use 2D rendering engine using Vulkan API as backend.
Stars: ✭ 60 (-79.87%)
Mutual labels: library, easy-to-use
Weatherview
WeatherView is an Android Library let you make cool weather animations for your app
Stars: ✭ 426 (+42.95%)
Mutual labels: opensource, library
Orionpreview
🅾️ OrionPreview is a simple animation with tanslation or scale views written in Java.
Stars: ✭ 335 (+12.42%)
Mutual labels: opensource, library
Cdnjs
🤖 CDN assets - The #1 free and open source CDN built to make life easier for developers.
Stars: ✭ 9,270 (+3010.74%)
Mutual labels: opensource, library
Angular Tree Component
A simple yet powerful tree component for Angular (>=2)
Stars: ✭ 1,031 (+245.97%)
Mutual labels: opensource, library
Eyebrows
An eyebrows gradient color animation for android.
Stars: ✭ 49 (-83.56%)
Mutual labels: library, easy-to-use
Image Comparison
Published on Maven Central and jCenter Java Library that compares 2 images with the same sizes and shows the differences visually by drawing rectangles. Some parts of the image can be excluded from the comparison. Can be used for automation qa tests.
Stars: ✭ 145 (-51.34%)
Mutual labels: opensource, library
Simpledialogfragments
A collection of easy to use and extendable DialogFragment's for Android
Stars: ✭ 94 (-68.46%)
Mutual labels: library, easy-to-use
Candyview
Implement any RecyclerView in just 1 Line. CandyView handles everything for you.
Stars: ✭ 15 (-94.97%)
Mutual labels: library, easy-to-use
Rando.js
The world's easiest, most powerful random function.
Stars: ✭ 659 (+121.14%)
Mutual labels: opensource, library
Lib
🤖 Lets you focus on the stuff that matters
Stars: ✭ 142 (-52.35%)
Mutual labels: opensource, library
Simple Php Router
Simple, fast and yet powerful PHP router that is easy to get integrated and in any project. Heavily inspired by the way Laravel handles routing, with both simplicity and expand-ability in mind.
Stars: ✭ 279 (-6.38%)
Mutual labels: library, easy-to-use
RevelyGradient
RevelyGradient is an Android library for easy gradient management !
About Revely
Web site - Open Source projects - Become my Patreon - Twitter - Instagram - Behance
Installation
Add the dependency
dependencies {
compile 'co.revely:gradient:1.0.1'
}
Usage
Kotlin
RevelyGradient
.linear()
.colors(intArrayOf(Color.parseColor("#FF2525"), Color.parseColor("#6078EA")))
.onBackgroundOf(view)
Java
RevelyGradient
.linear()
.colors(new int[] {Color.parseColor("#FF2525"), Color.parseColor("#6078EA")})
.onBackgroundOf(findViewById(R.id.view));
Choose the type of your gradient
.radial()
.linear()
.sweep()
Choose the gradient colors
.colors(intArrayOf(Color.parseColor("#FF2525"), Color.parseColor("#6078EA"), Color.parseColor("#6078EA")))
Center your gradient
.center(100f, 200f)
Rotate the gradient around the center
.angle(42)
Change the transparency of your gradient
.alpha(0.5f)
Scale the gradient
.scale(0.5f, 1f)
Change the positions of color in the gradient
.offsets(floatArrayOf(0f, 0.1f, 0.5f, 1f))
Apply the gradient on the background of view
.onBackgroundOf(text_view)
or directly on the view (TextView, ImageView, Button, ...)
.on(text_view)
You can also use the layer function to stack several gradients
.layer(
RevelyGradient
.radial(TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, 150f, Resources.getSystem().displayMetrics ))
.colors(intArrayOf(Color.parseColor("#ffdd55"), Color.parseColor("#ffdd55"), Color.parseColor("#ff543e"), Color.parseColor("#c837ab")))
.offsets(floatArrayOf(0f, 0.1f, 0.5f, 1f))
.center(50, 400),
RevelyGradient
.radial(TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, 170f, Resources.getSystem().displayMetrics ))
.colors(intArrayOf(Color.parseColor("#3771c8"), Color.parseColor("#3771c8"), Color.parseColor("#006600ff")))
.offsets(floatArrayOf(0f, 0.128f, 1f))
.angle(-15f)
.scale(1f, 0.4f)
.center(0, 0)
).onBackgroundOf(view)
To animate your gradient use .animate()
val color1 = Color.parseColor("#00c6ff")
val color2 = Color.parseColor("#ff72ff")
val valueAnimator = ValueAnimator.ofFloat(0f, 360f)
valueAnimator.duration = 15000
valueAnimator.repeatCount = ValueAnimator.INFINITE
valueAnimator.interpolator = LinearInterpolator()
RevelyGradient.sweep()
.colors(intArrayOf(color1, color2, color1))
.animate(valueAnimator, { _valueAnimator, _gradientDrawable ->
_gradientDrawable.angle = _valueAnimator.animatedValue as Float
})
.onBackgroundOf(container)
valueAnimator.start()
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].