LolliPin Android Library
LolliPin Android Library
How to use LolliPin Android Libraryin eclipse :-
Step 1: Create a new Android Project
Step 2: Import Library to your Android Application Project
1: File->New->Other
2: Select Android Project
3: Select "Create Project from existing source"
4: Click "Browse and select LolliPin Android Library,
5: Finish
6: Right-click on your project -> Properties
7: In Android->Library section click Add
8: select recently added project -> Ok
9: that's it!
Gradle(Android studio):
Please Join our Facebook Group and Page
Facebook group: Android controls
Facebook page: Android Controls
Subscribe YouTube channel: Click here
SUBSCRIBE TO OUR EMAIL NEWSLETTER & RECEIVE UPDATES RIGHT IN YOUR INBOX. Click here
If You Have Any question or Suggestions Please Feel Free to Comments .
Description:- This Library provide a a Lollipop material design styled android pincode library (API 10+).
Min SDK: 10 (Android 2.3.3–2.3.7 Gingerbread).
Contributors: Olivier Goutay, Stoyan Dimitrov, Art Beatte IV, Yassine Bentaieb
Step 1: Create a new Android Project
Step 2: Import Library to your Android Application Project
1: File->New->Other
2: Select Android Project
3: Select "Create Project from existing source"
4: Click "Browse and select LolliPin Android Library,
5: Finish
6: Right-click on your project -> Properties
7: In Android->Library section click Add
8: select recently added project -> Ok
9: that's it!
Gradle(Android studio):
//Lollipin
compile 'com.github.orangegangsters:lollipin:1.2.2@aar'
How To Use LolliPin Android Library : In order to use the "Forgot" system, we let you extend the AppLockActivity class to provide your own way of handling the user behaviour in this case (logout, delete datas etc...)public class CustomPinActivity extends AppLockActivity {
@Override
public void showForgotDialog() {
//Launch your popup or anything you want here
}
}
Init
Advised to be done by extending the Application, but can be done elsewhere. The method below provides a way to enable or disable the PinCode system:
Enabling
LockManager<CustomPinActivity> lockManager = LockManager.getInstance();
lockManager.enableAppLock(this, CustomPinActivity.class);
Once enabled, you must extend "PinActivity" for every Activity you wish to protect.
Disabling
LockManager<CustomPinActivity> lockManager = LockManager.getInstance();
lockManager.disableAppLock();
Set up the PinCode
Whenever you want the user to set up his pin code, you need to request:
Intent intent = new Intent(MainActivity.this, CustomPinActivity.class);
intent.putExtra(AppLock.EXTRA_TYPE, AppLock.ENABLE_PINLOCK);
startActivityForResult(intent, REQUEST_CODE_ENABLE);
Unlock system
As soon as you enable the PinCode system, the Unlock screen will appear by itself when the user resume the app after a defined timeout. Please refer to the next section to know how to customize these values.
Customization
Some features are customizable:
The unlock timeout:
LockManager<CustomPinActivity> lockManager = LockManager.getInstance();
lockManager.getAppLock().setTimeout(10000);
The logo displayed at the top of the page:
LockManager<CustomPinActivity> lockManager = LockManager.getInstance();
lockManager.getAppLock().setLogoId(R.drawable.security_lock);
The ignored activities: For instance you got a login activity that you want to avoid getting the lock screen, you can ignore this activity by doing:
LockManager<CustomPinActivity> lockManager = LockManager.getInstance();
lockManager.getAppLock().addIgnoredActivity(NotLockedActivity.class);
The AppLockActivity Layout: By providing a custom layout to getContentView() you can alter how your AppLockActivity looks. However, you must include 4 required elements:
- TextView with an id of pin_code_step_textview
- TextView with an id of pin_code_forgot_textview
- PinCodeRoundView with an id of pin_code_round_view
- KeyboardView with an id of pin_code_keyboard_view
@Override
public int getContentView() {
return R.layout.activity_pin;
}
The Pin Dots: By supplying alternate drawable resources for app:lp_empty_pin_dot and app:lp_full_pin_dot you can custimize how it looks.
<com.github.orangegangsters.lollipin.lib.views.PinCodeRoundView
android:id="@+id/pin_code_round_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/pin_code_round_top_margin"
android:layout_marginBottom="@dimen/pin_code_elements_margin"
app:lp_empty_pin_dot="@drawable/pin_empty_dot"
app:lp_full_pin_dot="@drawable/pin_full_dot"/>
Please Join our Facebook Group and Page
Facebook group: Android controls
Facebook page: Android Controls
Subscribe YouTube channel: Click here
SUBSCRIBE TO OUR EMAIL NEWSLETTER & RECEIVE UPDATES RIGHT IN YOUR INBOX. Click here
If You Have Any question or Suggestions Please Feel Free to Comments .
Sir, I need full code of this lollipin project please send me on my mail Id. thank you...
ReplyDelete