android - How to set size width of customize fragment tab with adapter? -
i create eash tab customize tab textviw, here code:
private void setuptabicons() { textview tabone = (textview) layoutinflater.from(this).inflate(r.layout.schedulestab2, null); tablayout.gettabat(0).setcustomview(tabone); textview tabthree = (textview) layoutinflater.from(this).inflate(r.layout.schedulestab3, null); tablayout.gettabat(1).setcustomview(tabthree); textview tabfour = (textview) layoutinflater.from(this).inflate(r.layout.schedulestab4, null); tablayout.gettabat(2).setcustomview(tabfour); }
the on layout textview customize tab :
<?xml version="1.0" encoding="utf-8"?> <textview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/schedulestab3" android:layout_width="10dp" android:layout_height="wrap_content" android:layout_alignparentright="false" android:layout_centerhorizontal="false" android:layout_gravity="center" android:foregroundgravity="top" android:gravity="right|center_vertical" android:text="@string/fa_chevron_left" android:textalignment="center" android:textcolor="@color/colorprimarydark" android:textsize="18dp" app:layout_anchorgravity="right" />
i've been try change width properties not lucky me, there not working..., tab show chevron right fontawesome, tab width width 1 character....
Comments
Post a Comment