Code example for CheckedTextView

Methods: setBackgroundColor

                // Find the text view from our interface 
                CheckedTextView tv = (CheckedTextView) view.findViewById( );
                // Color the text view background using our color 
                tv.setBackgroundColor( m_colors[position] );
            return view;
    public ColorPreference( Context context, AttributeSet attrs )
        super(context, attrs);
        // Here you should fill up the m_colors array with the colors you want to use. You can either 
        // have a static initializer, or read the array from resources. 
        m_colors = new int[10];