我正在创建日历,并将根据当前季节制作动画。即使是冬天,雪花也会从屏幕的顶部掉下来。在屏幕上的(0,0)处绘制图像在左下角绘制
目前我的日历布局已经到位,当我在(0,0)处绘制图像时,我期望它们进入屏幕的左上角......我将我的雪花添加到主布局,但由于某些原因,他们去了我的gridView的底部。我只能假设,我的布局之一是占用空间,但我不知道.. 这里是我的日历布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/calendar_main_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg"
android:gravity="center_horizontal"
android:orientation="vertical" >
<Button android:text="Selected :"
android:id="@+id/main_header_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/calendar_top_header" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<ImageView
android:id="@+id/calendar_left_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/cal_left_arrow_off" />
<Button android:text=""
android:id="@+id/selected_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/calendar_centralheader"
/>
<ImageView
android:id="@+id/calendar_right_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/cal_right_arrow_off" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/blue_bg_with_text" />
</LinearLayout>
<GridView
android:id="@+id/calendar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:numColumns="7" >
</GridView>
</LinearLayout>
这里是一个什么样的日历看起来像Eclipse的一个截图: