欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android編程使用自定義shape實現(xiàn)shadow陰影效果的方法

 更新時間:2015年11月19日 12:38:16   作者:lee0oo0  
這篇文章主要介紹了Android編程使用自定義shape實現(xiàn)shadow陰影效果的方法,涉及Android中xml文件布局的相關(guān)技巧,具有一定參考借鑒價值,需要的朋友可以參考下

本文實例講述了Android編程使用自定義shape實現(xiàn)shadow陰影效果的方法。分享給大家供大家參考,具體如下:

直接上xml文件, 并且附上相應(yīng)的解析:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
 <item android:state_pressed="true">
  <layer-list>
   <!-- 相當(dāng)于padding -->
   <item android:left="4dp" android:top="4dp">
    <shape>
     <solid android:color="#ff58bb52" />
     <corners android:radius="30dip"/>
    </shape>
   </item>
  </layer-list>
 </item>
 <item>
  <layer-list>
   <!-- SHADOW LAYER -->
   <item android:left="4dp" android:top="4dp">
    <shape>
     <solid android:color="#66000000" />
     <corners android:radius="30dip"/>
    </shape>
   </item>
   <!-- CONTENT LAYER -->
   <!-- 相當(dāng)于padding -->
   <item android:bottom="4dp" android:right="4dp">
    <shape>
     <solid android:color="#ff58bb52" />
     <corners android:radius="30dip"/>
    </shape>
   </item>
  </layer-list>
 </item>
</selector>

希望本文所述對大家Android程序設(shè)計有所幫助。

相關(guān)文章

最新評論