樣式:android
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/corner_record"
android:orientation="vertical" >安全
<View
android:id="@+id/center"
android:layout_width="2dp"
android:layout_height="@dimen/tophight"
android:layout_centerInParent="true"
android:background="@drawable/list_leftred" />.net
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_centerInParent="true"
android:background="#DB6A8D" />get
<LinearLayout
android:id="@+id/top"
android:layout_width="wrap_content"
android:layout_height="@dimen/tophight"
android:layout_alignParentLeft="true"
android:layout_marginLeft="5dp"
android:layout_weight="1"
android:orientation="vertical" >it
<TextView
android:id="@+id/period_tv"
style="@style/setting_body_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="預計安全期:第3天" />io
<LinearLayout
android:id="@+id/period_tv"
style="@style/setting_body_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical" >class
<TextView
style="@style/setting_body_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:text="減重指數:" />cli
<RatingBar
android:id="@+id/lostweight_rating"
style="@style/articlelist_item_ratingbar_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:clickable="false"
android:focusable="false"
android:isIndicator="true"
android:rating="1"
android:stepSize="0.5" />
</LinearLayout>
</LinearLayout>im
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/tophight"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@id/center"
android:layout_weight="1"
android:orientation="vertical" >layout
<TextView
android:id="@+id/syllepsis_tv"
style="@style/setting_body_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="受孕概率:55%" />
<LinearLayout
android:id="@+id/syllepsis_tv"
style="@style/setting_body_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical" >
<TextView
style="@style/setting_body_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="美膚指數:" />
<RatingBar
android:id="@+id/skin_rating"
style="@style/articlelist_item_ratingbar_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
android:isIndicator="true"
android:rating="2"
android:stepSize="0.5" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
關於其中的
<style name="articlelist_item_ratingbar_style" parent="@android :style/Widget.RatingBar"> <item name="android:progressDrawable">@drawable/ratingbar_drawable</item> <item name="android:minHeight">@dimen/ratingbar_wh</item> <item name="android:maxHeight">@dimen/ratingbar_wh</item> </style>