I'm using android support design widget BottomNavigationView for making my bottom navigation items. this is the result of the job :
it has 2 problems , first it doesn't show the titles under the items, the second problem I want the items to fill the with , I don't want to have free space on the navigation ,I just want them to fill the space and divide the space between items.
this is my menu code:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_item1"
android:icon="@drawable/phone"
app:showAsAction="ifRoom"
android:title="ارتباط" />
<item
android:id="@+id/action_item2"
android:icon="@mipmap/ic_history"
app:showAsAction="ifRoom"
android:title="سوابق خرید" />
<item
android:id="@+id/action_item3"
android:icon="@drawable/sabad"
app:showAsAction="ifRoom"
android:title="سبد خرید" />
<item
android:id="@+id/action_item4"
android:icon="@drawable/market2"
app:showAsAction="ifRoom"
android:title="فروشگاه" />
</menu>
this is the xml code :
` <RelativeLayout
android:id="@+id/activity_main"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.truiton.bottomnavigation.MainActivity">
<FrameLayout
android:id="@+id/frame_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/navigation"
android:animateLayoutChanges="true">
</FrameLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/colorPrimary"
app:itemIconTint="#fff"
app:itemTextColor="#F2F2F4"
app:menu="@menu/bottom_navigation_items"/>
</RelativeLayout>`
How can I solve this issue?