Hide layout when focus on it is lost in XML

I have the following xml file:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/FrameLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

<android.support.v4.view.ViewPager
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/pager"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
</android.support.v4.view.ViewPager>

<LinearLayout
    android:id="@+id/musicLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:gravity="center"
    android:orientation="horizontal"
    android:padding="10dp"
    android:focusable="true"
    android:visibility="visible" >

    <ImageView
        android:id="@+id/backward"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/backward" />

    <ImageView
        android:id="@+id/stop"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="8dp"
        android:src="@drawable/stop" />

    <ImageView
        android:id="@+id/pausePlay"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="8dp"
        android:src="@drawable/play" />

    <ImageView
        android:id="@+id/forward"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="8dp"
        android:paddingRight="10dp"
        android:src="@drawable/forward" />

</LinearLayout>

Frameeayout is for the tabbed action bar, which is the viewpager in the above layout. The action bar works great. The problem I want to solve is that the last linearlayout, which is actually a media player floating at the bottom of the screen, should be hidden when I click outside linelayout! I tested onfocuschangelistener in musicLayout andin browsing, but nothing happens! What am I doing wrong?
Edit:
In case this helps, each tab is a fragment with its own layout, which is added to the viewPager.

+5
1

, , ViewGroup. , ViewPager, LinearLayout View . onClickListener , .

, :

<View android:id="@+id/transparent_view"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:clickable="true"/>
+2

All Articles