title: Menu Tabs Don't Respond
body: <p>Currently I'm making UI for my app. I use <a href="https://github.com/umano/AndroidSlidingUpPanel" rel="nofollow noreferrer">Sliding Up Panel</a> and <a href="https://github.com/joseedwin84/Android-Sliding-Tabs-With-Material-Design" rel="nofollow noreferrer">Sliding Tabs</a> <a href="http://www.android4devs.com/2015/01/how-to-make-material-design-sliding-tabs.html" rel="nofollow noreferrer">(tutorial with implementation explanation)</a> features. Both work fine. I even managed to implement them in one project, but that's where problem comes in - Home and Event's tabs are unresponsive when I touch them(should open the page it's representing), but they change when I slide between tabs. </p>
  
  <p><a href="https://i.stack.imgur.com/XjIzI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XjIzI.png" alt="enter image description here"></a></p>
  
  <p>Here's my layout code. This is where the problem is. I'm sure of it.</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  tools:context=".MainActivity"&gt;
  
  &lt;include
      android:id="@+id/tool_bar"
      layout="@layout/tool_bar"
      android:layout_height="wrap_content"
      android:layout_width="match_parent"
      /&gt;
  
   &lt;com.sothree.slidinguppanel.SlidingUpPanelLayout
      xmlns:sothree="http://schemas.android.com/apk/res-auto"
      android:id="@+id/sliding_layout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="bottom"
      sothree:umanoPanelHeight="68dp"
      sothree:umanoShadowHeight="4dp"
      sothree:umanoParalaxOffset="100dp"
      sothree:umanoDragView="@+id/dragView"&gt;
  
        &lt;!-- MAIN CONTENT --&gt;
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          android:background="#ff0000"&gt;
          &lt;com.ui.test.SlidingTabLayout
      android:id="@+id/tabs"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
  
      android:background="@color/ColorPrimary"/&gt;
  
  &lt;android.support.v4.view.ViewPager
      android:id="@+id/pager"
      android:layout_height="match_parent"
      android:layout_width="match_parent"
      android:layout_weight="1"&gt;
   &lt;/android.support.v4.view.ViewPager&gt;
      &lt;/RelativeLayout&gt;
  
        &lt;!-- SLIDING LAYOUT --&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="#55eeeeee"
          android:orientation="vertical"
          android:clickable="true"
          android:focusable="false"
          android:id="@+id/dragView"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="68dp"
              android:orientation="horizontal"&gt;
  
              &lt;TextView
                  android:id="@+id/name"
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="1"
                  android:textSize="14sp"
                  android:gravity="center_vertical"
                  android:paddingLeft="10dp"/&gt;
  
              &lt;Button
                  android:id="@+id/follow"
                  android:layout_width="wrap_content"
                  android:layout_height="match_parent"
                  android:textSize="14sp"
                  android:gravity="center_vertical|right"
                  android:paddingRight="10dp"
                  android:paddingLeft="10dp"/&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;ImageView
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:scaleType="fitStart"
              android:src="@drawable/daimage" &gt;
          &lt;/ImageView&gt;
      &lt;/LinearLayout&gt;
  &lt;/com.sothree.slidinguppanel.SlidingUpPanelLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>If I remove part that adds Sliding Up Panel features, clicking function enables.</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  tools:context=".MainActivity"&gt;
  
  &lt;include
      android:id="@+id/tool_bar"
      layout="@layout/tool_bar"
      android:layout_height="wrap_content"
      android:layout_width="match_parent"
      /&gt;
  
  
          &lt;com.ui.test.SlidingTabLayout
      android:id="@+id/tabs"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
  
      android:background="@color/ColorPrimary"/&gt;
  
  &lt;android.support.v4.view.ViewPager
      android:id="@+id/pager"
      android:layout_height="match_parent"
      android:layout_width="match_parent"
      android:layout_weight="1"&gt;
   &lt;/android.support.v4.view.ViewPager&gt;
  </code></pre>
  
  <p></p>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity implements OnTouchListener{
  
      // Declaring Your View and Variables
  
      Toolbar toolbar;
      ViewPager pager;
      ViewPagerAdapter adapter;
      SlidingTabLayout tabs;
      CharSequence Titles[]={"Side","Front", "Result"};
      int Numboftabs =3;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.activity_main);
  
  
          // Creating The Toolbar and setting it as the Toolbar for the activity
  
          toolbar = (Toolbar) findViewById(R.id.tool_bar);
          setSupportActionBar(toolbar);
  
  
          // Creating The ViewPagerAdapter and Passing Fragment Manager, Titles fot the Tabs and Number Of Tabs.
          adapter =  new ViewPagerAdapter(getSupportFragmentManager(),Titles,Numboftabs);
  
          // Assigning ViewPager View and setting the adapter
          pager = (ViewPager) findViewById(R.id.pager);
          pager.setAdapter(adapter);
  
          // Assiging the Sliding Tab Layout View
          tabs = (SlidingTabLayout) findViewById(R.id.tabs);
          tabs.setDistributeEvenly(true); // To make the Tabs Fixed set this true, This makes the tabs Space Evenly in Available width
  
  
  
          // Setting Custom Color for the Scroll bar indicator of the Tab View
          tabs.setCustomTabColorizer(new SlidingTabLayout.TabColorizer() {
              @Override
              public int getIndicatorColor(int position) {
                  return getResources().getColor(R.color.tabsScrollColor);
              }
          });
  
  
  
          // Setting the ViewPager For the SlidingTabsLayout
          tabs.setViewPager(pager);
  
          tabs.setOnTouchListener(new View.OnTouchListener() {
              @Override
              public boolean onTouch(View v, MotionEvent event) {
                  v.getParent().requestDisallowInterceptTouchEvent(false);
                  return false;
              }   
          });
  
  
  
  
      }
  
  
  
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  
          @Override
  public boolean onTouch(View v, MotionEvent event) {
      // TODO Auto-generated method stub
      return false;
  }
  
  
  }
  </code></pre>