gpt4 book ai didi

android - 偏好铃声默认值

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:01:07 25 4
gpt4 key购买 nike

我的 preferences.xml 中有这个

        <RingtonePreference android:key="ringtone_uri"
android:title="@string/preferences_select_ringtone"
android:showDefault="true" android:srinlent="true"
android:summary="@string/preferences_select_ringtone_summary" />

每次我第一次开始全新安装应用程序时,默认值为无声:(,当我点击铃声首选项时,对话框打开时默认选择无声。我希望默认为“默认铃声”被选中。我该怎么做 enter image description here

我如何将默认值设置为“默认铃声”而不是无声,我不知道为什么我的默认值是无声我没有在我的代码中的任何地方设置,无声是android系统的默认值。 ..

最佳答案

将默认值设置为默认铃声的最简单方法

<RingtonePreference
android:showDefault="true"
android:showSilent="true"
android:defaultValue="content://settings/system/notification_sound"
.......
>
</RingtonePreference>

关于android - 偏好铃声默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7634711/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com