Creating bottom horizontal menu Android Studio

0

I want to create a navigation bottom in my application. I took a look at the one in the Android documentation, but I wish the icons were not highlighted in size when clicked, like YouTube.

Could you help me?

    
asked by anonymous 03.07.2017 / 03:17

1 answer

0

See in this answer as creating tabs , and to fix the TabLayout "in the footer, enter a ViewPager before set the layout_weight property to 1 . Here's how it should look:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainTest"
    android:orientation="vertical">

    <android.support.v7.widget.Toolbar 
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorPrimary"
        android:minHeight="?attr/actionBarSize"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
        app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />

    <android.support.v4.view.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"/>

    <android.support.design.widget.TabLayout
        android:id="@+id/sliding_tabs"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorPrimary"
        />    
</LinearLayout>

See an image below:

    
03.07.2017 / 04:05