title: how to set a selector for a child in LinearLayout
body: <p>I want to create this effect</p>
  
  <p>Initially</p>
  
  <p><img src="https://i.stack.imgur.com/949I0.png" alt="enter image description here"></p>
  
  <p>and when pressed to be shown like this.</p>
  
  <p><img src="https://i.stack.imgur.com/q1g4z.png" alt="enter image description here"></p>
  
  <p>I Know that the first thing that comes to mind is a selector. But each child is a LinearLayout out with a background set to white with an ImageView and with a TextView. So I guess I shoud set a selector for the whole child. A thing that I don't know if and how it can be done. So if you have any ideas please give me some help. This is the xml of the layout:</p>
  
  <pre><code>&lt;LinearLayout
                      android:id="@+id/line_1"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_above="@+id/line_2"
                      android:layout_marginBottom="1dp"
                      android:layout_marginLeft="10dp"
                      android:layout_marginRight="10dp"
                      android:baselineAligned="false"
                      android:gravity="center_vertical" &gt;
  
                      &lt;LinearLayout
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_marginRight="1dp"
                          android:layout_weight="1"
                          android:background="#FFFFFF"
                          android:gravity="center_horizontal"
                          android:clickable="true"
                          android:orientation="vertical" &gt;
  
                              &lt;ImageView
                                  android:layout_width="wrap_content"
                                  android:layout_height="50dp"
                                  android:clickable="true"
                                  android:src="@drawable/sights_selector" /&gt;
  
                              &lt;TextView
                                  android:id="@+id/corfu_textView"
                                  android:layout_width="match_parent"
                                  android:layout_height="wrap_content"
                                  android:text="Sights"
                                  android:gravity="center"
                                  android:textSize="10sp" /&gt;
  
                      &lt;/LinearLayout&gt;
  
                      &lt;LinearLayout
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_marginRight="1dp"
                          android:layout_weight="1"
                          android:background="#FFFFFF"
                          android:gravity="center_horizontal"
                          android:orientation="vertical" &gt;
  
                              &lt;ImageView
                                  android:layout_width="wrap_content"
                                  android:layout_height="50dp"
                                  android:src="@drawable/activities_selector" /&gt;
  
                             &lt;TextView
                                 android:id="@+id/epirus_textView"
                                 android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
                                 android:gravity="center"
                                 android:text="Activities"
                                 android:textSize="10sp" /&gt;
  
                      &lt;/LinearLayout&gt;
  
                      &lt;LinearLayout
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_marginRight="1dp"
                          android:layout_weight="1"
                          android:background="#FFFFFF"
                          android:gravity="center_horizontal"
                          android:orientation="vertical" &gt;
  
                              &lt;ImageView
                                  android:layout_width="wrap_content"
                                  android:layout_height="50dp"
                                  android:src="@drawable/accomodation_selector" /&gt;
  
                              &lt;TextView
                                  android:id="@+id/vlora_textView"
                                  android:layout_width="match_parent"
                                  android:layout_height="wrap_content"
                                  android:text="Accomodation"
                                  android:gravity="center"
                                  android:textSize="10sp" /&gt;
  
                      &lt;/LinearLayout&gt;
  
                     &lt;LinearLayout
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:gravity="center_horizontal"
                          android:layout_weight="1"
                          android:background="#FFFFFF"
                          android:orientation="vertical"&gt;
  
                              &lt;ImageView
                                  android:layout_width="wrap_content"
                                  android:layout_height="50dp"
                                  android:src="@drawable/villages_selector" /&gt;
  
                              &lt;TextView
                                  android:id="@+id/vlora_textView"
                                  android:layout_width="match_parent"
                                  android:layout_height="wrap_content"
                                  android:text="Villages"
                                  android:gravity="center"
                                  android:textSize="10sp" /&gt;
  
                      &lt;/LinearLayout&gt;
  
                  &lt;/LinearLayout&gt;
  </code></pre>