I'm using a calendarView in my app inside a navigation drawer to select different days and everything works fine except for swiping to the left on the calendarView to get to the next month (swiping to right changes to the previous month correctly), since this is the swipe gesture that closes the drawer.
Is it possible to change the scroll direction of the calendar to vertical instead of horizontal? I want to implement this so users don't solemnly need to rely on the buttons to switch between months.
This is the code from fragment_navigation_drawer.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/nav_header_container"
android:layout_width="match_parent"
android:layout_height="140dp"
android:background="@color/colorPrimary">
<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/ic_profile"
android:scaleType="fitCenter"
android:layout_centerInParent="true"
android:contentDescription="@string/app_icon"/>
</RelativeLayout>
<CalendarView
android:id="@+id/calendarView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</CalendarView>
</LinearLayout>
which looks like this in my app:
来源:https://stackoverflow.com/questions/37822403/android-calenderview-change-scroll-direction-to-vertical