/**
* Create the "Select Instruments For Each Track " lists.
* The list of possible instruments is in MidiFile.java.
*/
private void createInstrumentPrefs(PreferenceScreen root) {
PreferenceCategory selectInstrTitle = new PreferenceCategory(this);
selectInstrTitle.setTitle(R.string.select_instruments_per_track);
root.addPreference(selectInstrTitle);
selectInstruments = new ListPreference[options.tracks.length];
for (int i = 0; i < options.instruments.length; i++) {
selectInstruments[i] = new ListPreference(this);
selectInstruments[i].setOnPreferenceChangeListener(this);
selectInstruments[i].setEntries(MidiFile.Instruments);
selectInstruments[i].setEntryValues(MidiFile.Instruments);
selectInstruments[i].setTitle("Track " + i);
selectInstruments[i].setValueIndex(options.instruments[i]);
selectInstruments[i].setSummary(selectInstruments[i].getEntry());
root.addPreference(selectInstruments[i]);
}
setAllToPiano = new Preference(this);
setAllToPiano.setTitle(R.string.set_all_to_piano);
setAllToPiano.setOnPreferenceClickListener(this);
root.addPreference(setAllToPiano);
}
SettingsActivity.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:TrueTone
作者:
评论列表
文章目录