gpt4 book ai didi

android - 铃声选择器 - 单选按钮集

转载 作者:IT老高 更新时间:2023-10-28 23:10:56 26 4
gpt4 key购买 nike

我可以成功调出铃声选择器并使用以下代码获取结果 uri...

    selsound_button.setOnClickListener(new OnClickListener()
{
public void onClick(View arg0)
{
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, "Select ringtone for notifications:");
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE,RingtoneManager.TYPE_ALARM);
startActivityForResult( intent, 999);
}
});

...但我没有弄清楚如何执行以下操作:

鉴于我已经知道当前的 uri,我希望告诉选择器它当前已被选中,以便它可以突出显示正确的单选按钮。目前,在我按下其中一个之前,根本没有选择任何单选按钮。

最佳答案

你需要添加

   intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, currenturi);

设置单选按钮

关于android - 铃声选择器 - 单选按钮集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12393016/

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