My project includes 6 icons on tabLayout
. They all put to tabs
programmatically, not with ImageView
from layout
. Now, it must be increased size of this icons for tablet screen.
I tried so much things; tried increase icon size, tried layout_ width
and layout_height
of tabItems. But that's all didn't work.
How can I increase icons size on tabLayout? Hope someone can help me for this.
Result_Activity.java
private Integer[] images;
Integer[] domesticImages = {
R.drawable.ic_directions_bus_black_24dp,
R.drawable.ic_flight_takeoff_black_24dp,
R.drawable.ic_directions_boat_black_24dp,
R.drawable.ic_train_black_24dp,
R.drawable.ic_hotel,
R.drawable.ic_rent_a_car
};
private Integer[] domesticImagesClicked = {
R.drawable.ic_directions_bus_clicked_24dp,
R.drawable.ic_flight_takeoff_clicked_24dp,
R.drawable.ic_directions_boat_clicked_24dp,
R.drawable.ic_train_clicked_24dp,
R.drawable.ic_hotel_clicked,
R.drawable.ic_rent_a_car_clicked
};
activity_result.xml
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@+id/rl_Detail"
android:background="#F4E6CA"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:tabBackground="?attr/selectableItemBackgroundBorderless"
app:tabIndicatorColor="@android:color/transparent"
app:tabPaddingEnd="15dp"
app:tabPaddingStart="15dp">
<android.support.design.widget.TabItem
android:id="@+id/tab1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:saveEnabled="true" />
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<android.support.design.widget.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</android.support.design.widget.TabLayout>