Loading src/com/cyanogenmod/cmparts/activities/TrackballNotificationActivity.java +10 −9 Original line number Diff line number Diff line Loading @@ -310,15 +310,19 @@ public class TrackballNotificationActivity extends PreferenceActivity implements return (uniqueArray(catList)); } private void removeFromList(String value) { private void manageCatList(String value, boolean add) { List<String> newList = new ArrayList<String>(); String[] tempList = mCatListString.split("\\|"); for(int i = 0; i < tempList.length; i++) { newList.add(tempList[i]); } if (!add) { int indexRemove = newList.indexOf(value); newList.remove(indexRemove); } else { newList.add(value); } String newCatList = new String(); for (String name : newList) { Loading Loading @@ -551,7 +555,7 @@ public class TrackballNotificationActivity extends PreferenceActivity implements return false; } removeFromList(value); manageCatList(value, false); loadPrefs(); PreferenceScreen prefSet = getPreferenceScreen(); ListPreference removeList = (ListPreference)prefSet.findPreference(REMOVE_CATEGORY); Loading Loading @@ -584,10 +588,7 @@ public class TrackballNotificationActivity extends PreferenceActivity implements public void onClick(DialogInterface dialog, int which) { //updateCatList(value.toString(), false); EditText textBox = (EditText) textEntryView.findViewById(R.id.cat_text); mCatListString = mCatListString + textBox.getText().toString() + "|"; Editor mEdit = mPrefs.edit(); mEdit.putString(CAT_KEY, mCatListString); mEdit.commit(); manageCatList(textBox.getText().toString(), true); loadPrefs(); PreferenceScreen prefSet = getPreferenceScreen(); ListPreference removeList = (ListPreference)prefSet.findPreference(REMOVE_CATEGORY); Loading Loading
src/com/cyanogenmod/cmparts/activities/TrackballNotificationActivity.java +10 −9 Original line number Diff line number Diff line Loading @@ -310,15 +310,19 @@ public class TrackballNotificationActivity extends PreferenceActivity implements return (uniqueArray(catList)); } private void removeFromList(String value) { private void manageCatList(String value, boolean add) { List<String> newList = new ArrayList<String>(); String[] tempList = mCatListString.split("\\|"); for(int i = 0; i < tempList.length; i++) { newList.add(tempList[i]); } if (!add) { int indexRemove = newList.indexOf(value); newList.remove(indexRemove); } else { newList.add(value); } String newCatList = new String(); for (String name : newList) { Loading Loading @@ -551,7 +555,7 @@ public class TrackballNotificationActivity extends PreferenceActivity implements return false; } removeFromList(value); manageCatList(value, false); loadPrefs(); PreferenceScreen prefSet = getPreferenceScreen(); ListPreference removeList = (ListPreference)prefSet.findPreference(REMOVE_CATEGORY); Loading Loading @@ -584,10 +588,7 @@ public class TrackballNotificationActivity extends PreferenceActivity implements public void onClick(DialogInterface dialog, int which) { //updateCatList(value.toString(), false); EditText textBox = (EditText) textEntryView.findViewById(R.id.cat_text); mCatListString = mCatListString + textBox.getText().toString() + "|"; Editor mEdit = mPrefs.edit(); mEdit.putString(CAT_KEY, mCatListString); mEdit.commit(); manageCatList(textBox.getText().toString(), true); loadPrefs(); PreferenceScreen prefSet = getPreferenceScreen(); ListPreference removeList = (ListPreference)prefSet.findPreference(REMOVE_CATEGORY); Loading