Hi everyone!
I'm trying to use TabLayout from support design library. I' using it within
Toolbar view group and selectors works well. Actually, no selector
customization wasn't performed to make it work, it's out of the box:
A layout where it's all ok:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/im.titanium"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentInsetEnd="0dp"
app:contentInsetStart="0dp"
android:paddingTop="@dimen/toolbar_top_padding"
app:layout_scrollFlags="scroll|enterAlways"
android:background="?attr/colorPrimary">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
layout="@layout/contacts_search"
android:layout_width="match_parent"
android:layout_height="64dip"/>
<android.support.design.widget.TabLayout
android:id="@+id/contactTabs"
android:layout_width="match_parent"
android:layout_height="41dp"
app:tabIndicatorHeight="4dp"
app:tabContentStart="66dp"
app:tabGravity="fill"
app:tabMaxWidth="0dp"
app:layout_scrollFlags="scroll|enterAlways"
app:tabMode="scrollable"/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
</LinearLayout>
So, I decided to use TabLayout in my custom view. But in this case touch
selectors doesn't work. Any ideas?
custom view layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical">
<android.support.design.widget.TabLayout
android:id="@+id/innerTabs"
android:layout_width="match_parent"
android:layout_height="44dp"
app:tabIndicatorHeight="5dp"
app:tabIndicatorColor="@color/primary_photo"
app:tabGravity="fill"
app:tabMaxWidth="0dp"
app:layout_scrollFlags="scroll|enterAlways"
android:paddingLeft="5dp"
android:paddingRight="5dp"/>
<FrameLayout
android:id="@+id/underTabView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/9bcf0d97-c2b4-4e6a-8bea-5aa303782484%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.