Android:click effect in a linearlayout
<p>I am a beginner in android programing and just started to play around with android.</p>

<p>I have a linearlayout which contains 2 textviews. When i click on the linearlayout, the textcolor in one textview and background in the other textview must change for a small peroid of time. It should return to its orginal textcolor and background after the click.</p>

<p>The problem is that the <code>setOnClickListener()</code> must be implemented on the linearlayout.</p>

<p>This is the code</p>

<pre><code>                           &lt;LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"                
            android:id="@+id/linearlayout_logout"
            android:orientation="horizontal"&gt;

            &lt;TextView
            android:gravity="center"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:background="@drawable/logout_home_icon" /&gt;

            &lt;TextView
                android:id="@+id/text_logout"
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:textColor="@color/white"
                android:text="Log Out"
                /&gt;
        &lt;/LinearLayout&gt;
</code></pre>

<p>Here the logout_home_icon is an image(.png)..plsss help.</p>
