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

Android使用xml自定義圖片實(shí)例詳解

 更新時(shí)間:2017年05月25日 16:11:37   作者:將進(jìn)酒-杯莫停  
這篇文章主要介紹了 Android使用xml自定義圖片實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下

Android使用xml自定義圖片實(shí)例詳解

實(shí)現(xiàn)效果圖:

白色圓角圖片

bg_round_rectangle_white.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
 android:shape="rectangle">

 <!-- 填充 -->
 <solid android:color="#FFFFFF" />

 <!-- 圓角 -->
 <corners
  android:radius="2dp"/>

 <!-- 描邊 -->
 <stroke
  android:width="1dp"
  android:color="#D5D5D5"/>

</shape>

白色圓角虛線框

bg_round_rectangle_white_dash.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
 android:shape="rectangle">

 <!-- 填充 -->
 <solid android:color="#FFFFFF" />

 <!-- 圓角 -->
 <corners
  android:radius="2dp"/>

 <!-- 虛線描邊 -->
 <stroke
  android:width="1dp"
  android:color="#DD4041"
  android:dashWidth="1dp"
  android:dashGap="2dp"/>

</shape>

紅色圓角圖片

bg_round_rectangle_red.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
 android:shape="rectangle">

 <!-- 填充 -->
 <solid android:color="#F15C5D" />

 <!-- 圓角 -->
 <corners
  android:radius="2dp"/>

 <!-- 描邊 -->
 <stroke
  android:width="1dp"
  android:color="#D42D2E"/>

</shape>

綠色圓角圖片

bg_round_rectangle_green.xml


<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
 android:shape="rectangle">

 <!-- 填充 -->
 <solid android:color="#88C14E" />

 <!-- 圓角 -->
 <corners
  android:radius="2dp"/>

 <!-- 描邊 -->
 <stroke
  android:width="1dp"
  android:color="#6FA13C"/>

</shape>

正三角形圖片

triangle_white_arrow_up.xml


<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
 android:fromDegrees="45"
 android:toDegrees="45"
 android:pivotX="-40%"
 android:pivotY="80%">

 <shape android:shape="rectangle">
  <solid android:color="#000000"/>
 </shape>

</rotate>

倒立正三角形圖片

triangle_white_arrow_down.xml


<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
 android:fromDegrees="45"
 android:toDegrees="45"
 android:pivotX="135%"
 android:pivotY="15%">

 <shape android:shape="rectangle">
  <solid android:color="#000000"/>
 </shape>

</rotate>

感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

  • Android APP瘦身(清除工程中沒用到的資源)詳解

    Android APP瘦身(清除工程中沒用到的資源)詳解

    這篇文章主要介紹了Android 清除工程中沒用到的資源詳解的相關(guān)資料,這里舉例說明如何實(shí)現(xiàn),需要的朋友可以參考下
    2016-11-11
  • Android編程實(shí)現(xiàn)wifi掃描及連接的方法

    Android編程實(shí)現(xiàn)wifi掃描及連接的方法

    這篇文章主要介紹了Android編程實(shí)現(xiàn)wifi掃描及連接的方法,涉及Android網(wǎng)絡(luò)操作掃描、查找、連接、線程等相關(guān)操作技巧,需要的朋友可以參考下
    2018-02-02
  • Android數(shù)據(jù)加密之Rsa加密的簡單實(shí)現(xiàn)

    Android數(shù)據(jù)加密之Rsa加密的簡單實(shí)現(xiàn)

    下面小編就為大家?guī)硪黄狝ndroid數(shù)據(jù)加密之Rsa加密的簡單實(shí)現(xiàn)。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2016-10-10
  • Android?數(shù)據(jù)結(jié)構(gòu)全面總結(jié)分析

    Android?數(shù)據(jù)結(jié)構(gòu)全面總結(jié)分析

    這篇文章主要為大家介紹了Android?數(shù)據(jù)結(jié)構(gòu)全面總結(jié)分析,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2022-12-12
  • Android自定義ViewGroup之FlowLayout(三)

    Android自定義ViewGroup之FlowLayout(三)

    這篇文章主要為大家詳細(xì)介紹了Android自定義ViewGroup之FlowLayout,常用于關(guān)鍵字標(biāo)簽,搜索熱詞列表等功能,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2016-09-09
  • Android實(shí)現(xiàn)日期時(shí)間選擇對話框

    Android實(shí)現(xiàn)日期時(shí)間選擇對話框

    這篇文章主要為大家詳細(xì)介紹了Android實(shí)現(xiàn)日期以及時(shí)間選擇對話框,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2021-09-09
  • Android studio中生成引用.aar和.jar的方法詳解

    Android studio中生成引用.aar和.jar的方法詳解

    這篇文章主要是講解.aar的生成與引用,文中的內(nèi)容屬于完全基礎(chǔ)性概念,對剛學(xué)習(xí)使用Android studio的朋友們很有幫助,有需要的可以參考學(xué)習(xí),下面來一起看看吧。
    2016-09-09
  • Android實(shí)現(xiàn)購物車及其他功能的角標(biāo)

    Android實(shí)現(xiàn)購物車及其他功能的角標(biāo)

    本文主要介紹了Android實(shí)現(xiàn)購物車及其他功能的角標(biāo)的相關(guān)知識。具有很好的參考價(jià)值。下面跟著小編一起來看下吧
    2017-04-04
  • JSON中optString和getString方法的區(qū)別

    JSON中optString和getString方法的區(qū)別

    optString方法會在對應(yīng)的key中的值不存在的時(shí)候返回一個(gè)空字符串,但是getString會拋一個(gè)JSONException 。下面通過一段代碼給大家介紹JSON中optString和getString方法的區(qū)別,感興趣的朋友一起看看吧
    2017-07-07
  • Android Studio和Gradle使用不同位置JDK的問題解決

    Android Studio和Gradle使用不同位置JDK的問題解決

    這篇文章主要介紹了Android Studio和Gradle使用不同位置JDK的問題解決,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-03-03

最新評論

枣强县| 广河县| 永昌县| 南城县| 靖边县| 德化县| 郁南县| 漳浦县| 隆尧县| 宜春市| 宁乡县| 石林| 洪泽县| 黎城县| 兴安县| 剑川县| 石林| 西和县| 淮南市| 巍山| 驻马店市| 枣庄市| 阳泉市| 威远县| 株洲市| 巴塘县| 探索| 淮滨县| 屯留县| 旌德县| 无锡市| 香河县| 荣昌县| 永定县| 若尔盖县| 措美县| 南阳市| 平罗县| 泰宁县| 双鸭山市| 胶南市|