【发布时间】:2014-09-19 01:11:35
【问题描述】:
我正在使用Caldroid 库将日历显示为对话框片段。它工作得很好,但是在横向模式下,日历没有显示所有日期(缺少上周)。看图:
我已经检查了该视图及其使用视图寻呼机的库中的 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="wrap_content"
android:background="@color/caldroid_white"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/calendar_title_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/calendar_left_arrow"
android:layout_width="50dp"
android:layout_height="44dp"
android:layout_alignParentLeft="true"
android:background="@drawable/left_arrow" />
<TextView
android:id="@+id/calendar_month_year_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_toLeftOf="@+id/calendar_right_arrow"
android:layout_toRightOf="@+id/calendar_left_arrow"
android:gravity="center_horizontal"
android:textIsSelectable="true"
android:textSize="22sp" />
<Button
android:id="@+id/calendar_right_arrow"
android:layout_width="50dp"
android:layout_height="44dp"
android:layout_alignParentRight="true"
android:background="@drawable/right_arrow" />
</RelativeLayout>
<GridView
android:id="@+id/weekday_gridview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-15dp"
android:numColumns="7"
android:stretchMode="columnWidth" >
</GridView>
<com.antonyt.infiniteviewpager.InfiniteViewPager
android:id="@+id/months_infinite_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-10dp" />
</LinearLayout>
【问题讨论】:
-
实际上我刚刚使用了库中的 dialogCaldroidFragment 类。所以库中的 xml 已更新。