设计思路
1.tablelayout.xml
<?xml version="1.0"encoding="utf-8"?>
<TableLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/darker_gray">
<GridLayout
style="@style/h_wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:columnCount="2">
<TextView
style="style/hht_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_rowWeight="1"
android:drawableTop="@drawable/clound"
android:text="string/_clound"
/>
<TextView
style="style/hht_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_rowWeight="1"
android:drawableTop="@drawable/bluetooth"
android:text="string/_bluetooth"
/>
<TextView
style="style/hht_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_rowWeight="1"
android:drawableTop="@drawable/gesture"
android:text="string/_gesture"
/>
<TextView
style="style/hht_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:layout_rowWeight="1"
android:drawableTop="@drawable/gps"
android:text="string/_gps"
/>
<TextView
style="style/hht_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_rowWeight="1"
android:drawableTop="@drawable/info"
android:text="string/_system_info"
/>
<TextView
style="style/hht_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:layout_rowWeight="1"
android:drawableTop="@drawable/internet"
android:text="string/_internet"
/>
<TextView
style="style/hht_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_rowWeight="1"
android:drawableTop="@drawable/language"
android:text="string/_system_language"
/>
<TextView
style="style/hht_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_columnWeight="1"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:layout_rowWeight="1"
android:drawableTop="@drawable/notifycation"
android:text="string/_set_notifycation"
/>
</GridLayout>
</TableLayout>
2.style.xml
<?xml version="1.0"encoding="utf-8"?>
<resources>
<string name="AppBaseTheam"parent="android:Theme.Light"></string>
<string name="AppTheme."parent="AppBaseTheam"></string>
<style name="h_wrap_content">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
</style>
<style name="hht_style">
<item name="android:layout_width">145dp</item>
<item name="android:layout_height">90dp</item>
<item name="android:gravity">center</item>
<item name="android:paddingTop">8dp</item>
<item name="android:paddingBottom">8dp</item>
<item name="android:drawablePadding">5dp</item>
<item name="android:background">@android:color/white</item>
</style>
</resources>
<resources>
<stringname="app_name">PhoneInfo</string>
<stringname="menu_setting">Setting</string>
<stringname="hello_world">Hello_world</string>
<stringname="_clound">Clound</string>
<stringname="_bluetooth">Bluetooth</string>
<stringname="_gesture">Gesture</string>
<stringname="_gps">GPS</string>
<stringname="_system_info">SystemInfo</string>
<stringname="_internet">Internet</string>
<stringname="_language">Language</string>
<stringname="_set_notifycation">Notifycation</string>
</resources>
<resources>
<stringname="app_name">手机信息页面</string>
<stringname="menu_setting">设置</string>
<stringname="hello_world">你好,世界</string>
<stringname="_clound">云通信</string>
<stringname="_bluetooth">蓝牙</string>
<stringname="_gesture">自定义手势</string>
<stringname="_gps">定位</string>
<stringname="_system_info">系统信息</string>
<stringname="_internet">网络</string>
<stringname="_language">语言</string>
<stringname="_set_notifycation">通知栏设置</string>
</resources>
5.效果图
通过这次实验我知道了学什么理论都得实践,实践是检验真理的唯一标准。通过向同学询问和同学探讨最终才得到最终效果。虽然过程很艰难但是是痛并快乐着,期待下一次的实验和考验。