-1

I have used calendar library in my app which is displaying full screen.When I add BottomNavigationView it is overlapping calendar view

This is the xml,

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:fab="http://schemas.android.com/apk/res-auto"
    xmlns:sv="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <android.support.design.widget.CoordinatorLayout 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=".activity.patient.PatientsActivity">

        <include
            layout="@layout/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="56dp">

            <com.alamkanak.weekview.WeekView
                android:id="@+id/weekView"
                android:layout_width="match_parent"
                android:layout_height="600dp"
                app:columnGap="8dp"
                app:dayBackgroundColor="#05000000"
                app:eventTextColor="@android:color/white"
                app:headerColumnBackground="#ffffffff"
                app:headerColumnPadding="8dp"
                app:headerColumnTextColor="@color/toolbar_text"
                app:headerRowBackgroundColor="@color/toolbar"
                app:headerRowPadding="12dp"
                app:hourHeight="60dp"
                app:noOfVisibleDays="3"
                app:textSize="12sp"
                app:todayBackgroundColor="#1848adff"
                app:todayHeaderTextColor="@color/accent" />

            <android.support.design.widget.BottomNavigationView
                android:id="@+id/bottom_navigation"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                app:itemBackground="@color/white"
                app:menu="@menu/bottom_navigation_main" />

        </RelativeLayout>

    </android.support.design.widget.CoordinatorLayout>

</android.support.v4.widget.DrawerLayout>

before, enter image description here

After, enter image description here

The calendar hour(11Pm -12am) should display above navigationview

1 Answers1

1

You can use either a scrollbar to scroll up the 11-12pm data.

Or You can apply Linear Layout inside your relative layout with vertical orientation and proper weight, it should work.

Alternatively also try layout_below="WeekView" in your bottom_nav tag.