最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

詳解Android 手機(jī)衛(wèi)士設(shè)置向?qū)ы撁?/h1>
 更新時(shí)間:2016年04月11日 11:05:35   作者:陶士涵  
這篇文章主要介紹了詳解Android 手機(jī)衛(wèi)士設(shè)置向?qū)ы撁娴南嚓P(guān)資料,需要的朋友可以參考下

推薦閱讀:

 淺析Android手機(jī)衛(wèi)士自定義控件的屬性

淺析Android手機(jī)衛(wèi)士關(guān)閉自動更新

設(shè)置向?qū)ы撁妫ㄟ^SharedPreferences來判斷是否已經(jīng)設(shè)置過了,跳轉(zhuǎn)到不同的頁面

自定義樣式

在res/values/styles.xml中

添加節(jié)點(diǎn)<style name=””>,設(shè)置名稱屬性

在<style>節(jié)點(diǎn)里面,添加節(jié)點(diǎn)<item name=””>設(shè)置名稱屬性,就是布局的各種參數(shù)

在<item>的文本里面,設(shè)置布局的各種參數(shù)值

在布局文件中引用樣式,style=”@style/xxxxxxxxxxxx

在TextView的左側(cè)放置小圖標(biāo)

使用左側(cè)圖標(biāo)屬性android:drawableLeft=”@android:drawable/xxxxxxxxxxx”,引用android系統(tǒng)的圖標(biāo),例如:@android:drawable/star_big_on

圖標(biāo)垂直居中對齊,使用對齊屬性 android:gravity=”center_vertical”

引導(dǎo)頁下面的小圓點(diǎn)

線性布局,橫向,ImageView,包裹內(nèi)容,整體居中

使用系統(tǒng)圖標(biāo) @android:drawable/presence_online

@android:drawable/presence_invisible

自定義按鈕狀態(tài)背景

在res/drawable/button.xml文件中定義,添加節(jié)點(diǎn)<selector>

定義按鈕按下狀態(tài) 添加<item>節(jié)點(diǎn),設(shè)置狀態(tài)屬性android:state_pressed=”true”

設(shè)置圖片屬性android:drawable=”xxxx”

設(shè)置按鈕焦點(diǎn)狀態(tài) 添加<item>節(jié)點(diǎn),設(shè)置狀態(tài)屬性android:state_focus=”true”

定義按鈕默認(rèn)圖片 添加<item>節(jié)點(diǎn),設(shè)置圖片屬性android:drawable=”xxxx”

設(shè)置圖片屬性android:drawable=”xxxx”

布局文件中,給按鈕設(shè)置背景,android:background=”@drawable/xxxxx”

activity_lost_find.xml

<?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:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#2D89EF"
android:gravity="center"
android:text="1.手機(jī)防盜設(shè)置向?qū)?
android:textColor="#fff"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="8dp"
android:text="手機(jī)防盜包含以下功能:"
android:textSize="16sp" />
<TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="SIM卡變更報(bào)警" />
<TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="GPS追蹤" />
<TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="遠(yuǎn)程數(shù)據(jù)銷毀" />
<TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="遠(yuǎn)程鎖屏" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_online" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_invisible" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_invisible" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_invisible" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:textColor="#444"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/button_selector"
android:text="下一步" />
</RelativeLayout>
</LinearLayout> 

button_selector.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/barcode_btn_guide_pressed" android:state_focused="true"></item>
<item android:drawable="@drawable/barcode_btn_guide_pressed" android:state_pressed="true"></item>
<item android:drawable="@drawable/barcode_btn_guide_normal"></item>
</selector>

 

相關(guān)文章

最新評論

临清市| 仙桃市| 双鸭山市| 莱芜市| 湟中县| 德昌县| 遵义县| 阜南县| 清镇市| 石台县| 龙岩市| 祥云县| 焦作市| 义马市| 阜新| 凤山市| 中江县| 庆元县| 江山市| 富顺县| 资中县| 饶河县| 郓城县| 磴口县| 西林县| 江都市| 青神县| 吉首市| 临澧县| 若尔盖县| 滁州市| 鞍山市| 运城市| 杭锦旗| 大庆市| 开化县| 奉新县| 阿拉善盟| 云梦县| 玉树县| 酒泉市|