仿iPhone密码锁效果

移动开发
一款仿iPhone的密码锁,带有动画效果。

源码简介

一款仿iPhone的密码锁,带有动画效果。
源码运行截图

源码片段

  1. public class DBSharedPreferences { 
  2.       
  3.     private Context context; 
  4.     public static final String _NAME = "DIARY_DB"
  5.     public static final String _USERD = "_USERD"
  6.   
  7.     public DBSharedPreferences(Context context) { 
  8.         this.context = context; 
  9.     } 
  10.   
  11.     // ///////////////////////////////////////////String/////////////////////////////////////////////////// 
  12.     public void putString(String key, String value) { 
  13.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  14.         Editor editor = sp.edit(); 
  15.         editor.putString(key, value); 
  16.         editor.commit(); 
  17.     } 
  18.   
  19.     public String getString(String key) { 
  20.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  21.         return sp.getString(key, "nothing"); 
  22.     } 
  23.   
  24.     // ///////////////////////////////////////////Integer/////////////////////////////////////////////////// 
  25.     public void putInteger(String key, int value) { 
  26.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  27.         Editor editor = sp.edit(); 
  28.         editor.putInt(key, value); 
  29.         editor.commit(); 
  30.     } 
  31.   
  32.     public Integer getInteger(String key) { 
  33.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  34.         return sp.getInt(key, -1); 
  35.     } 
  36.   
  37.     // ///////////////////////////////////////////Boolean/////////////////////////////////////////////////// 
  38.     public void putBoolean(String key, boolean value) { 
  39.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  40.         Editor editor = sp.edit(); 
  41.         editor.putBoolean(key, value); 
  42.         editor.commit(); 
  43.     } 
  44.   
  45.     public boolean getBoolean(String key) { 
  46.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  47.         return sp.getBoolean(key, false); 
  48.     } 
  49.   
  50.     // ///////////////////////////////////////////Long/////////////////////////////////////////////////// 
  51.     public void putLong(String key, long value) { 
  52.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  53.         Editor editor = sp.edit(); 
  54.         editor.putLong(key, value); 
  55.         editor.commit(); 
  56.     } 
  57.   
  58.     public long getLong(String key) { 
  59.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  60.         return sp.getLong(key, -1); 
  61.     } 
  62.   
  63.     // ///////////////////////////////////////////Float/////////////////////////////////////////////////// 
  64.     public void putFloat(String key, float value) { 
  65.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  66.         Editor editor = sp.edit(); 
  67.         editor.putFloat(key, value); 
  68.         editor.commit(); 
  69.     } 
  70.   
  71.     public float getFloat(String key) { 
  72.         SharedPreferences sp = context.getSharedPreferences(_NAME, 1); 
  73.         return sp.getFloat(key, 0.0F); 
  74.     } 

源码下载:http://down.51cto.com/data/1980604

责任编辑:chenqingxiang 来源: 网络整理
相关推荐

2015-01-26 13:22:55

密码锁

2011-06-03 09:05:18

Android iphone tab

2011-06-03 09:34:14

Android iphone tab

2013-09-22 11:22:09

2011-07-08 10:15:15

IPhone 动画

2011-03-30 14:33:57

jQueryJavaScript

2017-03-22 10:35:06

AndroidRecyclerVie滑动效果

2015-03-31 18:19:37

饿了么动画效果

2012-12-27 10:51:14

Android开发iPhone时间轮

2011-04-15 09:29:20

jQueryFlash

2015-01-19 12:19:04

iOS源码ActionSheet仿QQ音乐

2021-12-27 10:11:22

加密后门密码学数据安全

2011-07-08 15:08:16

iPhone 图片

2015-01-22 16:04:06

iPhone

2016-08-30 21:36:56

JavascriptCSSWeb

2011-08-22 14:21:24

iPhone开发UIView Anim

2011-08-12 14:04:53

iPhone动画

2011-08-16 17:18:44

iPhone开发安全

2011-07-27 13:48:30

iPhone 安全

2020-10-26 15:21:06

人脸识别技术门禁系统
点赞
收藏

51CTO技术栈公众号