首先總結一下昨天做的界面。
把兩個主要佈局做出來,之後還會再繼續優化。
1、最上面的邊距還要繼續調整,右邊的“網頁”、“億”還要再繼續調整。
2、背景顏色(綠色),按鈕的顏色,細線的顏色,都要繼續調整。
3、“立即優化”按鈕處的細節待完善。
4、下面按鈕都有一個點擊事件,但是我目前用的全部都是線性佈局,我要考慮下之後要不要換成GridView來做。
先上圖:
cygn.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="6.5" android:orientation="vertical" android:background="#00ff00" > <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" > <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_horizontal" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/privacy_password_pro_logo" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="360衛士" android:textSize="20sp" /> </LinearLayout> <ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/st_icon_wifi_exam" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" /> </RelativeLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="6" android:gravity="center" > <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="立即優化" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="5.5" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" > <LinearLayout android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="center" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/exam_frequently_used_tools_icon_clean" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="清理加速" android:textSize="12sp" /> </LinearLayout> <View android:layout_width="1dp" android:layout_height="match_parent" android:background="#110000" /> <LinearLayout android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="center" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/exam_frequently_used_tools_icon_net_traffic" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="花費流量" android:textSize="12sp" /> </LinearLayout> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="1dp" android:background="#110000" /> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" > <LinearLayout android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="center" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/exam_frequently_used_tools_icon_block_anoy" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="騷擾攔截" android:textSize="12sp" /> </LinearLayout> <View android:layout_width="1dp" android:layout_height="match_parent" android:background="#110000" /> <LinearLayout android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="center" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/exam_frequently_used_tools_icon_txl" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="通訊錄" android:textSize="12sp" /> </LinearLayout> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="1dp" android:background="#110000" /> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" > <LinearLayout android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="center" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/exam_frequently_used_tools_icon_guardpay" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="支付保鏢" android:textSize="12sp" /> </LinearLayout> <View android:layout_width="1dp" android:layout_height="match_parent" android:background="#110000" /> <LinearLayout android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="center" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/exam_frequently_used_tools_icon_malware" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="手機殺毒" android:textSize="12sp" /> </LinearLayout> </LinearLayout> </LinearLayout> </LinearLayout>
好的,繼續優化調整。有看客有哪裏可以指點的請不吝賜教。