Android-Lock9View


Source link: https://github.com/TakWolf/Android-Lock9View

Android Lock9View

An Android grid lock screen view with a callback interface.

ScreenShot

Demo

Usage

Gradle

implementation 'com.takwolf.android:lock9view:0.1.1'

Layout example 1

<com.takwolf.android.lock9.Lock9View
  android:id="@+id/lock_9_view"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_gravity="center"
  app:lock9_nodeSrc="@drawable/node_normal"
  app:lock9_nodeOnSrc="@drawable/node_active"
  app:lock9_nodeOnAnim="@anim/node_on_1"
  app:lock9_padding="28dp"
  app:lock9_spacing="28dp"
  app:lock9_lineColor="@color/blue_light"
  app:lock9_lineWidth="8dp"
  app:lock9_autoLink="false"
  app:lock9_enableVibrate="true"
  app:lock9_vibrateTime="20" />

Layout example 2

<com.takwolf.android.lock9.Lock9View
  android:id="@+id/lock_9_view"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_margin="24dp"
  android:layout_gravity="center"
  app:lock9_nodeSrc="@drawable/node_small_normal"
  app:lock9_nodeOnSrc="@drawable/node_small_active"
  app:lock9_nodeOnAnim="@anim/node_on_2"
  app:lock9_nodeSize="16dp"
  app:lock9_nodeAreaExpand="24dp"
  app:lock9_lineColor="@color/blue_light"
  app:lock9_lineWidth="4dp"
  app:lock9_autoLink="true"
  app:lock9_enableVibrate="true"
  app:lock9_vibrateTime="20" />

PS :

If use "lock9_nodeSize" , it will ignore "lock9_padding" and "lock9_spacing".

The nodes will be layout on the center of 9 average areas.

Touch area

If you want to draw a small node with a bigger touch area, please user :

app:lock9_nodeAreaExpand="24dp"  // default is 0 

touchArea = lock9_nodeSize + lock9_nodeAreaExpand * 2

Animation

app:lock9_nodeOnAnim="@anim/node_on_2" 

AutoLink

app:lock9_autoLink="true" // default is false 

Vibrate

app:lock9_enableVibrate="true"  // default is false app:lock9_vibrateTime="20"

// default is 20 milliseconds 

Also need :

<uses-permission android:name="android.permission.VIBRATE" />

Activity

Lock9View lock9View = (Lock9View) findViewById(R.id.lock_9_view);
 lock9View.setGestureCallback(new Lock9View.GestureCallback() {

@Override
  public void onNodeConnected(@NonNull int[] numbers) {

// Do something
  
}

@Override
  public void onGestureFinished(@NonNull int[] numbers) {

// Do something
  
}
  
}
);

Change Log

0.1.0

  • This is a broken api version.

  • Extend gesture callback.

Limitations

???????????????????????????????????

?????????????????????

  • ???????

  • ???????

  • ???????????????????????????????????????

  • ??????????????????????????

  • ???????????????????????????

??????????????????????????????????

??????????????????????????? UI ????????

Author

TakWolf

[email protected]

http://takwolf.com

License

Copyright 2014 TakWolf  Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

Resources

Android Runtime Permissions Library to support Android 6.0+

NetSugar is an Android + AOP framework. It was a way of Aspect-Oriented Programming with AspectJ(ApsectJ 5) on Android. It is an easy-use and lightweight framework to check network state.

Utilities for using RxJava with Realm.

Snacky is a small library to help you adding a Snackbar to your layout with ease. Snacky uses an easy builder pattern to build a Snackbar and gives you some template designs like ERROR, WARNING, INFO and SUCCESS as well as some customization options.

Android layout to show most common state templates like loading, empty, error etc. To do that all you need to is wrap the target area(view) with StatefulLayout.

Rx2Animations is a library with the main goal to make android animations more solid and cohesive.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes