我正在创建一个像这张图片一样的日历
但我的屏幕看起来像这样
我如何不完全 7 个按钮如何只显示 4 个按钮 我将如何使布局与示例图像相同
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="@+id/last_week"
android:layout_width="50sp"
android:layout_height="fill_parent"
android:background="#F2F2F2"
android:src="@drawable/barrowleft2" >
</ImageView>
<TableLayout
android:id="@+id/table_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:stretchColumns="0,1,2,3,4,5,6" >
<TableRow
android:background="#F2F2F2"
android:paddingBottom="12dp" >
<TextView
android:id="@+id/sun"
android:gravity="center"
android:text="@string/sunday"
android:textColor="#000000" />
<TextView
android:id="@+id/mon"
android:gravity="center"
android:text="@string/monday"
android:textColor="#000000" />
<TextView
android:id="@+id/tue"
android:gravity="center"
android:text="@string/tuesday"
android:textColor="#000000" />
<TextView
android:id="@+id/wed"
android:gravity="center"
android:text="@string/wednesday"
android:textColor="#000000" />
<TextView
android:id="@+id/thur"
android:gravity="center"
android:text="@string/thursday"
android:textColor="#000000" />
<TextView
android:id="@+id/fri"
android:gravity="center"
android:text="@string/friday"
android:textColor="#000000" />
<TextView
android:id="@+id/sat"
android:gravity="center"
android:text="@string/saturday"
android:textColor="#000000" />
</TableRow>
<TableRow>
<Button
android:id="@+id/e00"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/calendar_button_selector"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#D9DBD7" >
</Button>
<Button
android:id="@+id/e01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/calendar_button_selector"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#D9DBD7" >
</Button>
<Button
android:id="@+id/e02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/calendar_button_selector"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#D9DBD7" >
</Button>
<Button
android:id="@+id/e03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/calendar_button_selector"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#D9DBD7" >
</Button>
<Button
android:id="@+id/e04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/calendar_button_selector"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#D9DBD7" >
</Button>
<Button
android:id="@+id/e05"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/calendar_button_selector"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#D9DBD7" >
</Button>
<Button
android:id="@+id/e06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/calendar_button_selector"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#D9DBD7" >
</Button>
</TableRow>
</TableLayout>
<ImageView
android:id="@+id/next_week"
android:layout_width="50sp"
android:layout_height="fill_parent"
android:background="#F2F2F2"
android:src="@drawable/barrrow113" >
</ImageView>
</LinearLayout>