Comments (5)
Hi @rojas...,
For example here is an XML file for a PreferenceActivity (pre Honeycomb), we
name it `res/xml/your_preferences.xml`:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="Settings" >
<Preference
android:key="pkey_lock_pattern_change_pattern"
android:title="Change pattern" />
</PreferenceScreen>
In your PreferenceActivity, you load it with:
import android.preference.Preference;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.your_preferences);
findPreference("pkey_lock_pattern_change_pattern")
.setOnPreferenceClickListener(
new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(
Preference preference) {
// Start LockPatternActivity here...
return true;
}// onPreferenceClick()
});
}// onCreate()
I hardcoded some strings, you might want to put them into
`res/values/strings.xml`. With Honeycomb+, you do the same in your
`PreferenceFragment`'s.
Hope this helps :-)
Have a nice day,
Hai
Original comment by [email protected]
on 10 May 2013 at 5:58
- Added labels: Component-Logic, Type-Other, Priority-Low
from android-lockpattern.
Original comment by [email protected]
on 10 May 2013 at 3:29
- Changed state: Done
from android-lockpattern.
Thanks, that was easy!
Excellent library by the way!
Original comment by [email protected]
on 11 May 2013 at 4:10
from android-lockpattern.
I've added some changes to the
[https://code.google.com/p/android-lockpattern/source/browse/demo demo project]
which make use of `PreferenceActivity` and `PreferenceFragment`'s. Though it's
a little complicated :-D
You might want to download the demo APK in
[https://code.google.com/p/android-lockpattern/downloads/list Downloads]
section or on
[https://play.google.com/store/apps/details?id=group.pals.android.lib.ui.lockpat
tern.demo Google Play] :-)
Original comment by [email protected]
on 21 May 2013 at 1:48
from android-lockpattern.
Thanks, I'll check it out. Nice job!
Original comment by [email protected]
on 22 May 2013 at 2:12
from android-lockpattern.
Related Issues (20)
- Including it in target = 8 app HOT 9
- retriving the pattern saved HOT 1
- No Demo Project HOT 1
- Cyanogen Configurable 6x6 dot model pattern HOT 4
- How to get Patten saved in shared preferences in decrypted form HOT 5
- Enhancement Request in a Way that Library can support Fragments HOT 16
- Vertical lock pattern - Not working HOT 5
- Pattern Lock on App Startup to validate user HOT 3
- Eclipse doesn't like the strings.xml which point to ../values-en/strings.xml ... HOT 3
- Newer Demo project for *** RELEASE v3.1 (#43) *** HOT 3
- Possible interaction with content below in dialog mode HOT 11
- Encryptor improvement HOT 4
- Draw the path when the first Cell was selected and move to next. HOT 1
- Long "loading" dialog between first entry and confirmation HOT 6
- The IContentView inteface dont exist. HOT 6
- How ot i add a forgot pattern button? HOT 4
- InflateException HOT 9
- I am new to android an i want to use this in my project HOT 3
- Cannot add library to project HOT 3
- DisplayMode.Animate creates the pattern infinitely. How to detect if the pattern has been animated once? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-lockpattern.