Smaller text in priority control

:
pull/14/head
Sam Bosley 11 years ago
parent f37176b073
commit a0626ddfc2

@ -32,6 +32,8 @@ public class ImportanceControlSet extends TaskEditControlSet {
private final int[] colors; private final int[] colors;
private final List<ImportanceChangedListener> listeners = new LinkedList<ImportanceChangedListener>(); private final List<ImportanceChangedListener> listeners = new LinkedList<ImportanceChangedListener>();
private static final int TEXT_SIZE = 18;
public interface ImportanceChangedListener { public interface ImportanceChangedListener {
public void importanceChanged(int i, int color); public void importanceChanged(int i, int color);
} }
@ -44,13 +46,10 @@ public class ImportanceControlSet extends TaskEditControlSet {
public void setImportance(Integer i) { public void setImportance(Integer i) {
for(CompoundButton b : buttons) { for(CompoundButton b : buttons) {
if(b.getTag() == i) { if(b.getTag() == i) {
b.setTextSize(getTextSize());
b.setChecked(true); b.setChecked(true);
b.setBackgroundResource(ThemeService.getDarkVsLight(R.drawable.importance_background_selected, R.drawable.importance_background_selected_dark, false)); b.setBackgroundResource(ThemeService.getDarkVsLight(R.drawable.importance_background_selected, R.drawable.importance_background_selected_dark, false));
} else { } else {
b.setTextSize(getTextSize());
b.setChecked(false); b.setChecked(false);
b.setTextColor(colors[(Integer)b.getTag()]);
b.setBackgroundResource(0); b.setBackgroundResource(0);
} }
} }
@ -60,10 +59,6 @@ public class ImportanceControlSet extends TaskEditControlSet {
} }
} }
private int getTextSize() {
return 24;
}
public Integer getImportance() { public Integer getImportance() {
for(CompoundButton b : buttons) for(CompoundButton b : buttons)
if(b.isChecked()) if(b.isChecked())
@ -115,6 +110,7 @@ public class ImportanceControlSet extends TaskEditControlSet {
} }
}); });
button.setTag(i); button.setTag(i);
button.setTextSize(TEXT_SIZE);
buttons.add(button); buttons.add(button);

Loading…
Cancel
Save