I am extending the ListView class so that I can make some of the text bold in the dropdown items. I am trying to Override the addView method so that i can change the text before the views are added. I am getting an error saying "method does not override method from it's superclass." addView is inherited from the class ViewGroup.
public class EditableListView extends ListView {
public EditableListView(Context context){
super(context);
}
public EditableListView(Context context, AttributeSet attrs){
super(context, attrs);
}
public EditableListView(Context context, AttributeSet attrs, int defStyle){
super(context, attrs, defStyle);
}
@Override
public void addView(View child, int index, LayoutParams params) {
final SpannableStringBuilder builder = new SpannableStringBuilder(((CheckedTextView)child).getText().toString());
final StyleSpan bold = new StyleSpan(android.graphics.Typeface.BOLD);
builder.setSpan(bold, 10, 21, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
builder.setSpan(bold, 36, 37, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
((CheckedTextView)child).setText(builder);
super.addView(child, index, params);
}
}