我在导航抽屉内的应用程序中使用日历视图来选择不同的日期,除了在日历视图上向左滑动以到达下个月(向右滑动正确更改上个月)之外,一切正常,因为这是关闭抽屉的滑动手势。
是否可以将日历的滚动方向更改为垂直而不是水平?我想实现这一点,这样用户就不必严格依赖按钮来切换月份。
这是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>
在我的应用程序中看起来像这样:
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)