title: How to change setBackground color and show tick image on click a button in android
body: <pre><code>&lt;RelativeLayout           
          android:layout_weight="1"
          android:layout_marginLeft="20dp"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
      &lt;ImageView
              android:id="@+id/checkimage"
              android:layout_width="16dp"
              android:layout_alignParentRight="true"
              android:layout_marginRight="10dp"
              android:layout_marginTop="10dp"
              android:visibility="gone"
              android:src="@drawable/greentickmark"
              android:layout_height="16dp" /&gt;
  
   &lt;LinearLayout
          android:id="@+id/clicklayout"
          android:orientation="vertical"
          android:layout_gravity="center"
          android:gravity="center"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
       &lt;ImageView
              android:id="@+id/click"
              android:layout_gravity="center"
              android:background="@drawable/background"
              android:layout_width="60dp"
              android:layout_height="50dp" /&gt;
     &lt;TextView
              android:textStyle="bold"
              android:textSize="10dp"
              android:layout_marginTop="4dp"
              android:textColor="@color/white"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
   &lt;/LinearLayout&gt;
   &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>If i click on click id Image View then layout background color is changed but check image is not visible.How to show this check image and change background color.</p>
  
  <pre><code>public void onClick(View v) { checkimage.setVisibility(View.VISIBLE);  
  
  clicklayout.setBackgroundColor(Color.parseColor("#2f0058")); } 
  </code></pre>