如何从 PreferenceActivity 更改音量?我有这个xml:
<RingtonePreference
android:name="Ringtone Preference"
android:summary="Select a ringtone"
android:title="Ringtones"
android:key="ringtonePref" />
<VolumePreference
android:name="Volume Preference"
android:summary="Ringtone Volume"
android:title="Ringtone Volume"
android:key="ringVolPref"/>
</PreferenceCategory>
并且该类扩展了 PreferenceActivity:
public class SettingTest extends PreferenceActivity {
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.layout.ringtone);
我不知道如何更改音量(如果我运行应用程序,它会显示 Volume SeekBar,但不会保存更改)