Android: why does Checkbox not show empty checkbox for unchecked state?
<p>I have checkbox code in a CardView layout file.  The CardView has a white background.  Normally, I think the unchecked Checkbox is a black square.  My layout shows no blank checkbox.  All I see is just the white CardView background (top CardView in the screenshot).  When I click on the right-most area of the CardView where the checkbox code is formatted, a green Checkbox appears (bottom CardView in the screenshot).  What am I missing here?  <a href="https://i.stack.imgur.com/czzuG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/czzuG.png" alt="enter image description here"></a>.</p>

<p>layout file:</p>

<pre><code>&lt;LinearLayout

xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/background4main"  &gt;

&lt;android.support.v7.widget.CardView
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/singlecard_view1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    card_view:cardBackgroundColor="@android:color/white"
    card_view:cardCornerRadius="6dp"
    android:orientation="horizontal"
    android:layout_margin="4dp"&gt;

    &lt;RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?android:selectableItemBackground"  &gt;

    &lt;TextView
        android:id="@+id/cardBlankText2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:text="todo"
        android:textStyle="bold"
        android:textColor="@android:color/black"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textSize="20sp"  /&gt;

    &lt;TextView
        android:id="@+id/cardBlankText3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/cardBlankText2"
        android:text="note1"
        android:textStyle="bold"
        android:textColor="@android:color/black"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textSize="20sp"  /&gt;

    &lt;CheckBox
        android:id="@+id/chkSelected"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:layout_centerVertical="true"  /&gt;

    &lt;/RelativeLayout&gt;

&lt;/android.support.v7.widget.CardView&gt;

&lt;/LinearLayout&gt;

Adapter file:
...
public class ListViewHolder extends RecyclerView.ViewHolder {

    TextView cardBlankText2;
    TextView cardBlankText3;
    CheckBox chkSelected;

    public ListViewHolder(View itemView) {
        super(itemView);

        cardBlankText2 = (TextView)itemView.findViewById(R.id.cardBlankText2);
        cardBlankText3 = (TextView)itemView.findViewById(R.id.cardBlankText3);
        chkSelected = (CheckBox) itemView.findViewById(R.id.chkSelected);
    }
...
@Override
public void onBindViewHolder(final ListViewHolder holder, final int position) {

        holder.cardBlankText2.setText(dbList.get(position).getTodo());
        holder.cardBlankText3.setText(dbList.get(position).getNote1());
        holder.chkSelected.setChecked(dbList.get(position).isSelected());
        holder.chkSelected.setTag(dbList.get(position));
}
</code></pre>