Open porpuera opened 7 years ago
I also have this issue. Can't figure out how to set icons. Not sure if possible but would be very nice to have a method to quickly change the icons with.
Put setCustomViewTab
before setViewPager
. It worked with me.
Thanx burnix!!!!! :D
hi thanks for nice library.
I'll try to custom tab view with icon and text. But the icon not show. this my code ,,,
ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);
this my xml custom tab <?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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="?attr/selectableItemBackground"
<com.package.view.TintableImageView android:id="@+id/custom_tab_icon" android:layout_width="24dp" android:layout_height="24dp" android:layout_above="@id/center_anchor" android:layout_centerHorizontal="true" android:scaleType="center" android:src="@drawable/custom_icon" app:tint="@color/grey_700" /> <TextView android:id="@+id/custom_tab_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/center_anchor" android:layout_centerHorizontal="true" android:layout_marginTop="2dp" android:maxLines="1" android:textColor="@color/grey_700" android:textSize="14sp" />
how to solve this? thanks before