2012年3月15日

[原]android 中如何飞行模式的几个操作

摘要: Android中如何判断系统当前是否处于飞行模式中:public static boolean IsAirModeOn(Context context) { return (Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) == 1 ? true : false); }如何切换飞行模式public static void setAirplaneMode(Context context, boolean enabling) { Settings.System... 阅读全文

posted @ 2012-03-15 20:02 tilltheendwjx 阅读(922) 评论(0) 推荐(0) 编辑

[原]android2.3如何使用SharedPreferences存储字符串集合类型的元素

摘要: Android3.0以上版本中 SharedPreferences新增了函数abstract Set<String> getStringSet(String key, Set<String> defValues)Retrieve a set of String values from the preferences.同时SharedPreferences.Editor中也新增了函数abstract SharedPreferences.Editor putStringSet(String key, Set<String> values)Set a set of 阅读全文

posted @ 2012-03-15 19:32 tilltheendwjx 阅读(6733) 评论(2) 推荐(0) 编辑

导航