TintLayout
This library help you to achieve popular tint effect from view.
You can check the sample app here.
Download
You can download a .jar
from GitHub's releases page.
Or use Gradle jCenter:
dependencies {
repositories {
mavenCentral()
maven {
url 'http://dl.bintray.com/gigamole/maven/'
}
}
compile 'com.github.gigamole.tintlayout:library:+'
}
Or Gradle Maven Central:
compile 'com.github.gigamole.tintlayout:library:1.0.2'
Or Maven:
<dependency>
<groupId>com.github.gigamole.tintlayout</groupId>
<artifactId>library</artifactId>
<version>1.0.2</version>
<type>aar</type> </dependency>
Android SDK Version
TintLayout
requires a minimum SDK version of 11.
Sample
Parameters
You can set such parameters as:
-
colors:
allows you to create shadow with transparent etc.
-
angle:
allows you to set the angle of tint.
Tips
TintLayout must have child. Only one child.
The angle can only be positive and be in range from 0 to 360.
Init
Check out in code init:
final TintLayout tintLayout = (TintLayout) findViewById(R.id.tint_layout);
tintLayout.setAngle(145);
And XML init:
<com.gigamole.tintlayout.lib.TintLayout
android:id="@+id/tint_layout"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_gravity="center"
android:background="@drawable/circle"
libs:colors="@array/tint_layout_colors">
<com.gigamole.tintlayout.AgencyTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/tint_layout_title"
android:textColor="@color/white"
android:textSize="50sp"
libs:agencyFont="agency_bold" /> </com.gigamole.tintlayout.lib.TintLayout>
If you want to look at circular tint animation just remove comment block in sample from XML
and MainActivity
.
Getting Help
To report a specific problem or feature request, open a new issue on Github.
License
Apache 2.0 and MIT. See LICENSE file for details.
Author
Made in DevLight Mobile Agency
Created by Basil Miller - @gigamole