Skip to content

This library help you to achieve popular drop shadow effect from view.

License

Notifications You must be signed in to change notification settings

TangGSen/TintLayout

 
 

Repository files navigation

TintLayout

This library help you to achieve popular tint effect from view.

enter image description here

U 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

enter image description here

You can set such parameters as:

  • colors:

    allows you to create shadow with transparent etc.

  • angle:

    allows you to set the angle of tint.

TintLayout must have child. Only one child.

The angle can only be positive and be in range from 0 to 360.

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. See LICENSE file for details.

Author

Basil Miller - @gigamole

About

This library help you to achieve popular drop shadow effect from view.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%