360手机卫士界面布局学习过程续(一)
生活随笔
收集整理的這篇文章主要介紹了
360手机卫士界面布局学习过程续(一)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
首先總結一下昨天做的界面。
把兩個主要布局做出來,之后還會再繼續優化。
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>好的,繼續優化調整。有看客有哪里可以指點的請不吝賜教。
轉載于:https://blog.51cto.com/androidxyx/1631373
總結
以上是生活随笔為你收集整理的360手机卫士界面布局学习过程续(一)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ES6箭头函数(Arrow Functi
- 下一篇: 微信开发学习日记(二):3个案例