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

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

推薦閱讀:

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

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

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

自定義樣式

在res/values/styles.xml中

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

在<style>節(jié)點里面,添加節(jié)點<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)頁下面的小圓點

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

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

@android:drawable/presence_invisible

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

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

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

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

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

定義按鈕默認圖片 添加<item>節(jié)點,設(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.手機防盜設(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="手機防盜包含以下功能:"
android:textSize="16sp" />
<TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="SIM卡變更報警" />
<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="遠程數(shù)據(jù)銷毀" />
<TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="遠程鎖屏" />
<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)文章

最新評論

福贡县| 深水埗区| 巴彦县| 巫山县| 贞丰县| 武定县| 洛浦县| 昌江| 台北县| 涞水县| 元朗区| 扎囊县| 云梦县| 黄梅县| 襄汾县| 民乐县| 乐至县| 临武县| 侯马市| 巴青县| 天台县| 府谷县| 鄢陵县| 西盟| 泰安市| 科技| 临湘市| 玉田县| 新乡县| 丹凤县| 大宁县| 广昌县| 扶绥县| 化隆| 海宁市| 花垣县| 迁西县| 孙吴县| 邓州市| 古丈县| 壤塘县|