80,349
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="75dp"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/date_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_alignParentLeft="true" >
<ImageView
android:id="@+id/date_image_view"
android:layout_width="219dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/date_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_breakfast_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/date_view" >
<ImageView
android:id="@+id/pre_of_breakfast_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/pre_of_breakfast_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_breakfast_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_breakfast_view" >
<ImageView
android:id="@+id/post_of_breakfast_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/post_of_breakfast_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_lunch_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/post_of_breakfast_view" >
<ImageView
android:id="@+id/pre_of_lunch_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/pre_of_lunch_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_lunch_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_lunch_view" >
<ImageView
android:id="@+id/post_of_lunch_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/post_of_lunch_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_dinner_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/post_of_lunch_view" >
<ImageView
android:id="@+id/pre_of_dinner_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/pre_of_dinner_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_dinner_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_dinner_view" >
<ImageView
android:id="@+id/post_of_dinner_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/post_of_dinner_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/night_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" >
<ImageView
android:id="@+id/night_image_view"
android:layout_width="138dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/night_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
[/quote]
这是ListView 的样式...
SimpleAdapter adapter = new SimpleAdapter(OmnylizerBsData.this,
logListItem, R.drawable.list_view_item1, new String[]{
"date_text_view", "pre_of_breakfast_text_view", "post_of_breakfast_text_view",
"pre_of_lunch_text_view", "post_of_lunch_text_view", "pre_of_dinner_text_view",
"post_of_dinner_text_view", "night_text_view"
}, new int[]{
R.id.date_text_view, R.id.pre_of_breakfast_text_view, R.id.post_of_breakfast_text_view,
R.id.pre_of_lunch_text_view, R.id.post_of_lunch_text_view, R.id.pre_of_dinner_text_view,
R.id.post_of_dinner_text_view, R.id.night_text_view}
);
allLogListView.setAdapter(adapter);
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="75dp"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/date_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_alignParentLeft="true" >
<ImageView
android:id="@+id/date_image_view"
android:layout_width="219dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/date_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_breakfast_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/date_view" >
<ImageView
android:id="@+id/pre_of_breakfast_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/pre_of_breakfast_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_breakfast_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_breakfast_view" >
<ImageView
android:id="@+id/post_of_breakfast_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/post_of_breakfast_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_lunch_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/post_of_breakfast_view" >
<ImageView
android:id="@+id/pre_of_lunch_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/pre_of_lunch_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_lunch_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_lunch_view" >
<ImageView
android:id="@+id/post_of_lunch_image_view"
android:layout_width="110dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/post_of_lunch_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/pre_of_dinner_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/post_of_lunch_view" >
<ImageView
android:id="@+id/pre_of_dinner_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/pre_of_dinner_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/post_of_dinner_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/pre_of_dinner_view" >
<ImageView
android:id="@+id/post_of_dinner_image_view"
android:layout_width="109dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/post_of_dinner_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/night_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" >
<ImageView
android:id="@+id/night_image_view"
android:layout_width="138dp"
android:layout_height="75dp"
android:layout_centerInParent="true"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:scaleType="fitXY"
android:src="@drawable/bg_table" />
<TextView
android:id="@+id/night_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:textSize="30dp" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>