Android gestures Unlocked

Source: Internet
Author: User

To introduce a very useful third-party gesture to unlock the control shaplelocker, not much nonsense first on:

You can replace the icons yourself according to your UI needs: circles, small arrows, etc...

GitHub Address:

http://panespanes.github.io/ShapeLocker/

The usage is simple, first add the dependency in the Gradle:

In the Build.gradle of the project (project, not module), Respositories's last plus a row references Jitpack's MAVEN warehouse address

    allprojects {        repositories {            ...            Maven {URL "Https://jitpack.io"}        }    }

Then add the dependencies in the build.grade that you need to use for the control's module:

    dependencies {            compile ' com.github.panespanes:shapelocker:v1.0.4 '    }

Start using it now!

Adding Shapelocker controls in Layout.xml

    <com.panes.shapelocker.view.shapelocker        android:layout_width= "match_parent"        android:layout_height= " Match_parent "        android:background=" @android: Color/darker_gray "        >    </ Com.panes.shapelocker.view.shapelocker>

OK, let's run for a look at the effect ~

--------

Tips

XML inside

Android:background= "@android: Color/darker_gray"

is actually the background color of the control, of course, you can also change your favorite color ~

--------

Personalize your settings

Shapelocker provides a configuration class that can apply some of the built-in themes:

Shapelockerproperties.with (Mcontext). Loadlighttheme ();

Of course, you can write this: the effect is the same

        Shapelocker SL = (shapelocker) Findviewbyid (R.ID.SL);        Sl.loadlighttheme ();

Currently only the default Lighttheme, the color scheme is

Inactive: Small white dot

Activation Status: Green Circle

Error Status: Red circle

Correct status: Green Circle

will consider adding more and better-looking themes in the future ~

The Shapelocker class also provides a set method to customize the various icons described above, leaving you to explore it yourself ~

Android gestures Unlocked

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.