【问题标题】:RingtonePreference Default valueRingtonePreference 默认值
【发布时间】:2012-01-08 22:57:52
【问题描述】:

我的首选项屏幕有此代码,

<RingtonePreference 
    android:key="notification_sound" 
    android:ringtoneType="notification" 
    android:title="Notification Sound" 
    android:showDefault="true" 
    android:showSilent="true" />

我想在 xml 中将 RingtonePreference 的默认值设置为 Default Notification Sound,该怎么做?

谢谢

【问题讨论】:

标签: android


【解决方案1】:

我找到了解决方案,感谢Joe,defaultValue 必须是:

android:defaultValue="content://settings/system/notification_sound"

【讨论】:

  • @d-a-v-o-o-d 在通过 Android Sudio 分析菜单执行 'Inspect Code...' 后,我收到 Cannot resolve symbol 'content://settings/system/notification_sound'
猜你喜欢
  • 1970-01-01
  • 2012-06-10
  • 2018-09-12
  • 2015-05-22
  • 1970-01-01
  • 1970-01-01
  • 2019-07-05
  • 2010-12-05
  • 2012-03-17
相关资源
最近更新 更多