1.實現圖片
2.代碼
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#e8e8e5" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_marginTop="20dp" android:layout_weight="1" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android:layout_height="21dp" android:layout_weight="2" android:background="#7ba8b0"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="此處爲圖書封面" android:textSize="20sp"></TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#baccde"> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="書名" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#baccde"> </LinearLayout> </LinearLayout> <!--中間顏色佈局--> <LinearLayout android:layout_width="3dp" android:layout_height="match_parent" android:background="#7489ab"> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="概述" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#2e4d5c"> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="作者" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#2e4d5c"> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="日期" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#2e4d5c"> </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_marginTop="20dp" android:layout_weight="1" android:background="#7ba8b0"> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android:layout_height="21dp" android:layout_weight="2" android:background="#7ba8b0"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="此處爲圖書封面" android:textSize="20sp"></TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#baccde"> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="書名" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#baccde"> </LinearLayout> </LinearLayout> <!--中間顏色佈局--> <LinearLayout android:layout_width="3dp" android:layout_height="match_parent" android:background="#7489ab"> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="概述" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#2e4d5c"> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="作者" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#2e4d5c"> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="日期" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#2e4d5c"> </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_marginTop="20dp" android:layout_marginBottom="20dp" android:layout_weight="1" android:background="#7ba8b0"> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android:layout_height="21dp" android:layout_weight="2" android:background="#7ba8b0"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="此處爲圖書封面" android:textSize="20sp"></TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#baccde"> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="書名" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#baccde"> </LinearLayout> </LinearLayout> <!--中間顏色佈局--> <LinearLayout android:layout_width="3dp" android:layout_height="match_parent" android:background="#7489ab"> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="概述" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#2e4d5c"> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="作者" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#2e4d5c"> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#bfd9d4"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="日期" android:textSize="20sp"> </TextView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="10dp" android:background="#2e4d5c"> </LinearLayout> </LinearLayout> </LinearLayout> </LinearLayout>
3.感覺
明明很簡單,但是確非常耗時。