我有我的偏好设置屏幕的代码,
<RingtonePreference
android:key="notification_sound"
android:ringtoneType="notification"
android:title="Notification Sound"
android:showDefault="true"
android:showSilent="true" />
Run Code Online (Sandbox Code Playgroud)
我想将RingtonePreference的默认值设置为Default Notification Soundxml,怎么办呢?
谢谢
DJa*_*ari 31
我找到了解决方案,多亏了Joe,defaultValue必须是:
android:defaultValue="content://settings/system/notification_sound"
Run Code Online (Sandbox Code Playgroud)