谢了这样的代码:this.getPreferenceManager().setSharedPreferencesName("preference");但是preference。xml显示不出来
解决方案 »
- vold.fstab请教!!!
- 运行Android项目启动不模拟器
- java web与android开发比较
- 我的AVD界面的背景怎么是白色的,求指导
- Android源码不能用logcat查看RILD中的LOG信息的问题
- 怎样在编译android时,更改Settings中设置的默认值
- andoird源码修改
- HorizontalScrollView + ListView 滚动问题
- android DroidParts框架使用
- IndexOutOfBoundsException: setSpan (12 ... 12) ends beyond length 6
- 如何通过Android.mk实现链接其他so
- Android新手关于目录res/的问题,请帮忙
不能这样保存。
用getEditor().commit();
才能保存
public abstract boolean onPreferenceChange (Preference preference, Object newValue)Since: API Level 1
Called when a Preference has been changed by the user. This is called before the state of the Preference is about to be updated and before the state is persisted.
Parameterspreference The changed Preference.
newValue The new value of the Preference.
ReturnsTrue to update the state of the Preference with the new value.