style.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="text"> <item name="android:textColor">#000</item> <item name="android:textSize">30px</item> </style> </resources>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/tableLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="10px" android:background="@drawable/background" tools:context="com.example.sl3_9.MainActivity" > <!-- row1 --> <TableRow android:id="@+id/tableRow1" android:layout_width="fill_parent" android:layout_weight="1" > <LinearLayout android:id="@+id/linearLayout1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:orientation="horizontal" android:background="@drawable/blockbg_big" > <TextView android:id="@+id/textView1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" android:text="@string/time" /> </LinearLayout> <LinearLayout android:id="@+id/linearLayout2" android:layout_height="fill_parent" android:layout_weight="1" android:orientation="horizontal" android:padding="20px" android:background="@drawable/blockbg_big" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img01" /> <ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img02" /> <ImageView android:id="@+id/imageView3" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/img03a" /> </LinearLayout> </TableRow> <!-- row2 --> <TableRow android:id="@+id/tableRow2" android:layout_width="fill_parent" android:layout_weight="1" > <LinearLayout android:orientation="horizontal" android:id="@+id/linearLayout3" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:background="@drawable/blockbg_big" > <ImageView android:id="@+id/imageView4" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img04" /> <ImageView android:id="@+id/imageView5" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img05" /> <ImageView android:id="@+id/imageView6" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img06" /> </LinearLayout> <LinearLayout android:orientation="horizontal" android:id="@+id/linearLayout4" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:background="@drawable/blockbg_big" > <ImageView android:id="@+id/imageView7" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1" android:src="@drawable/img07" /> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="3" android:gravity="center_vertical" style="@style/text" android:text="转到音乐" /> </LinearLayout> </TableRow> <!-- row3 --> <TableRow android:id="@+id/tableRow3" android:layout_width="fill_parent" android:layout_weight="1" android:background="@drawable/blockbg_big"> <LinearLayout android:id="@+id/linearLayout5" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginLeft="20px" android:orientation="horizontal" android:layout_weight="1" > <ImageView android:id="@+id/imageView8" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/email" /> <TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="fill_parent" style="@style/text" android:text="电子邮件" android:gravity="center_vertical" /> </LinearLayout> </TableRow> </TableLayout>