QuatroGrade is a beautiful multi color (4 corners) gradient.

Overview

Android Arsenal | | Setup Guide | Report new issue

QuatroGrade

QuatroGrade is a beautiful multi color gradient. Basically, it is a 4 vertex gradient.

Features:

  • Multi color, or the default 4 corners color gradient QuatroGradeView.
  • Changing the orientation of the gradients for better look.
  • Gradient colors dynamic change and animation support.
  • XML and programmatic setup.
  • Advanced Sample App.

Sample App

Default Custom Animation

Download or clone this repository to discover the sample app.

Setup

Add to the root build.gradle:

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

Add to the package build.gradle:

dependencies {
    implementation 'com.github.GIGAMOLE:QuatroGrade:{latest-version}'
}

Latest version is: .

Also, it is possible to download the latest artifact from the releases page.

Guide

XML Guide:

QuatroGradeView tag:

<com.gigamole.quatrograde.QuatroGradeView/>

QuatroGradeView attributes:

Attribute Description
qgv_colors The array of color values (size 4). Setup with 4 colors on each corner: top-left, top-right, bottom-left, bottom-right.
qgv_topColors The array of color values (size 2+). Provides the top gradient colors.
qgv_topPositions The string-array of float values (size 2+). Provides the top gradient colors positions.
qgv_bottomColors The array of color values (size 2+). Provides the bottom gradient colors.
qgv_bottomPositions The string-array of float values (size 2+). Provides the bottom gradient colors positions.
qgv_orientation The enum of horizontal or vertical value. Set the orientation of the top and bottom gradients. In the vertical orientation the top gradient moves to the left, and bottom moves to the right.

The qgv_topColors and qgv_topPositions arrays should have equals size. The same for the qgv_bottomColors and qgv_bottomPositions. Basically, the color position range from 0.0 to 1.0.

The qgv_colors tag is dominant, so it will override the qgv_topColors, qgv_topPositions, qgv_bottomColors, qgv_bottomPositions attributes.

The qgv_orientation change is useful for presenting 3+ colors on the wide or tall screens(depends on the orientation).

Code Guide:

Methods to setup the QuatroGradeView: setColors, setColorsRes, setColorsInt, setGrades.

The GradeModel is the holder of the color and its position on the gradient.

To change the orientation: quatroGradeView.orientation.

Methods to animate or change the single GradeModel: getTopGrades, getBottomGrades, getGrades.

The refresh method is applying changes and redraws gradients after the manipulation over the GradeModels.

Please, follow the Sample App to properly discover these features.

License

MIT License. See the LICENSE file for more details.

Credits

Special thanks to the side.codes for the amazing color picker library.

Created at intive.

Author:

Basil Miller
[email protected]

You might also like...
A Jetpack Compose-based app to exhibit all the beautiful GLSL Fragment shaders I have ever written, where you can set them as Live Wallpaper.
A Jetpack Compose-based app to exhibit all the beautiful GLSL Fragment shaders I have ever written, where you can set them as Live Wallpaper.

🎨 Shader Showcase Shader Showcase is a minimal Android app made with Jetpack Compose, to showcase all the beautiful OpenGL* based Fragment shaders I

Just another Quotes app with beautiful UI which shows random quotes from the internet
Just another Quotes app with beautiful UI which shows random quotes from the internet

RandomQuotes Just another Quotes app with beautiful UI which shows random quotes from the internet. Screenshots Libraries Volley Android Material API

A beautiful app showing the use of a single recyclerview to display multiple views with motion layout and clean architecture
A beautiful app showing the use of a single recyclerview to display multiple views with motion layout and clean architecture

This app shows how to use a single recyclerview to build a beautiful multiple view layout (See image below) using clean architectural pattern

A handy phone call manager with phonebook, number blocking and multi-SIM support
A handy phone call manager with phonebook, number blocking and multi-SIM support

Simple Dialer A lightweight app for handling your calls, no matter where are you. Comes with a handy call log for easy call initiation. There is a qui

An android app built using Kotlin following Multi-Module Clean Architecture MVVM
An android app built using Kotlin following Multi-Module Clean Architecture MVVM

Notflix 🛠️ Work In Progress 🛠 An android app built using Kotlin that consumes TMDB API to display current trending, upcoming and popular movies 🍿 a

A multi-modular Gradle project that encapsulates various modules to learn Kotlin language, tools and frameworks.

KotlinLearn This is a gradle project for the sole basis of exploring and learning Kotlin language, tools and frameworks. The root project wil encapsul

BuildConfiguration information for use in multi-module, or Kotlin Multiplatform common code

component-build-configuration A small library supporting Kotlin Multiplatform for utilizing BuildConfiguration details from common code and across mod

Easy Note: Building a Notes app using MVVM, JetPack Compose with a clean multi-module architecture approach.
Easy Note: Building a Notes app using MVVM, JetPack Compose with a clean multi-module architecture approach.

Easy Note Easy Note: Notes app using JetPack Compose and MVVM with a clean architecture approach. This app shows the usage of the new Navigation Archi

This project shows trending github repositories using MVI (Model View Intent) using kotlin flows and multi module clean architecture

GithubTrendingMVIFlow Build Architecture: This project shows trending github repositories using MVI (Model View Intent) using kotlin flows and multi m

Releases(1.0.0)
  • 1.0.0(Jun 29, 2021)

    QuatroGrade is a beautiful multi color gradient. Basically, it is a 4 vertex gradient.

    preview-51 (dragged)

    Features:

    • Multi color, or the default 4 corners color gradient QuatroGradeView.
    • Changing the orientation of the gradients for better look.
    • Gradient colors dynamic change and animation support.
    • XML and programmatic setup.
    • Advanced Sample App.
    Source code(tar.gz)
    Source code(zip)
Owner
Basil Miller
Senior Android Developer Expert | Available ✅
Basil Miller
Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.

Palette Helper is a simple utility app made to generate color palettes of images using Google's fantastic Palette library. It's mostly a for-fun pet p

Zac Sweers 154 Nov 18, 2022
Utility Android app for generating color palettes of images using the Palette library. Written in Kotlin.

Palette Helper is a simple utility app made to generate color palettes of images using Google's fantastic Palette library. It's mostly a for-fun pet p

Zac Sweers 154 Nov 18, 2022
An app to detect color palettes in the real world - powered by VisionCamera

Colorwaver An app to detect colorwaves (swatches/palettes) in the real world - powered by VisionCamera and Reanimated. I wrote this app in less than a

Marc Rousavy 476 Dec 25, 2022
A small API to add Quran with Tajweed Color in Android App

QuranApi A simple Api to implement Quran in Android. Add To Project Step 1. Add the JitPack repository to your build file Add it in your root build.gr

DevilCat 11 Aug 5, 2022
Theme for VSCode and JetBrains IDEs, based on morhetz/gruvbox but with a plainer color palette for syntax highlighting.

gruvbox-plain Theme for VSCode and JetBrains IDEs, based on morhetz/gruvbox but with a plainer color palette for syntax highlighting. Syntax Colors gr

null 2 Dec 28, 2022
A Music Player for android that renders beautiful DNA(Visualization) of the currently playing music.

MusicDNA - A Music Player like no other A Music Player for android that makes use of the Visualizer Class for rendering a beautiful DNA (Visualization

Harjot Singh Oberai 2.8k Jan 5, 2023
📱 Android Library to implement Rich, Beautiful, Stylish 😍 Material Navigation View for your project with Material Design Guidelines. Easy to use.

Material NavigationView for Android ?? ?? Android Library to implement Rich, Beautiful Material Navigation View for your project with Material Design

Shreyas Patil 198 Dec 17, 2022
An elegant and beautiful Android app manager

An elegant and beautiful Android app manager

Hamza Rizwan 250 Jan 1, 2023
A beautiful android Quotes App where you can read and save quotes.

This repository contains source code of a Quotes app, which helps you stay motivated by providing best picked quotes stated by famous personalities. This app uses zen quotes api, for retrieving quotes.

Gourav Khunger 34 Nov 14, 2022
A beautiful android Quotes App where you can read and save quotes.

QuotesApp A beautiful Quotes App where you can read and save quotes. This repository contains source code of a Quotes app, which helps you stay motiva

Gourav Khunger 24 Nov 12, 2021