这是我的日历视图
<CalendarView
android:id="@+id/calendarView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_above="@+id/tableLayout"
android:layout_alignParentTop="true" />
下面我有3个按钮,下面给出了xml
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tableLayout"
android:padding="5dp" android:stretchColumns="0"
android:textAlignment="center"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="@+id/tableRow1">
<Button
android:id="@+id/trackAttendance"
android:layout_height="wrap_content"
android:text="Track Class Attendance"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_width="50dp"
android:textColor="#ffffff"
android:textSize="15dp"
android:background="@drawable/mybuttons"> </Button>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="@+id/tableRow2">
<Button
android:id="@+id/trackSessions"
android:layout_height="wrap_content"
android:text="Track Study Sessions"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_width="50dp"
android:textColor="#ffffff"
android:textSize="15dp"
android:background="@drawable/mybuttons"> </Button>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="@+id/tableRow3">
<Button
android:id="@+id/trackActivities"
android:layout_height="wrap_content"
android:text="Track Class Activities"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_width="50dp"
android:textColor="#ffffff"
android:textSize="15dp"
android:background="@drawable/mybuttons"> </Button>
</TableRow>
</TableLayout>
当我在屏幕尺寸小于4.5英寸的手机上运行时,我无法查看日历视图中的所有日期。显示如下所示
如果不使用股票谷歌日历视图,是否有任何解决方法。 提前致谢