Code example for Activity

Methods: getResources

0
        public void importanceChanged(int i, int color);
    } 
 
    public ImportanceControlSet(Activity activity, int layout) {
        super(activity, layout);
        colors = Task.getImportanceColors(activity.getResources());
    } 
 
    public void setImportance(Integer i) {
        for(CompoundButton b : buttons) {
            if(b.getTag() == i) {
                b.setTextSize(getTextSize());
                b.setChecked(true);
                b.setBackgroundResource(R.drawable.importance_background_selected);
            } else { 
                b.setTextSize(getTextSize());
                b.setChecked(false);
                b.setTextColor(colors[(Integer)b.getTag()]);
                b.setBackgroundResource(0);
            } 
        }