It’s easy to create a shadow for your views using custom shapes.

The idea it’s that you create the shadow layer as background first and the content layers on top of that.
But you also need to displace the layers in order to create the shadow effect.

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"><item android:state_pressed="true"><layer-list><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 --><item android:bottom="4dp" android:right="4dp"><shape><solid android:color="#ff58bb52" /><corners android:radius="30dip"/></shape></item></layer-list></item>
</selector>

Shadow effect with custom shapes相关推荐

  1. Custom Shapes/Combin Shapes/合并图形 in PowerPoint 2010

    PowerPoint has a lot of great preset shapes, but sometimes what you really need is a custom shape ta ...

  2. 自定义带阴影的shape

    翻译:Shadow effect with custom shapes 使用自定义Shape很容易就能给视图增加一个阴影. 方法是首先生成一个背景阴影层,然后内容层放在上面. 但是你还需要按顺序显示它 ...

  3. mtb11_Dashboard(collapse, hide filters)_DATETRUNC_Donut_各种chart_Custom Shapes Size_action_layout

    This chapter has been written with the intent of empowering you with design knowledge and Tableau-ce ...

  4. 2017年Spring发布了30个新的Android库,值得您关注

    by Michal Bialas 由Michal Bialas 2017年Spring推出的30个最酷的Android库 (The 30 Coolest Android Libraries from ...

  5. 基本figure类型

    第一部分介绍了Matplotlib基本功能,基本figure类型. Simple Plotting example In [113]: %matplotlib inline import matplo ...

  6. Python 绘图问题:Matplotlib中plt.rcParams[]使用方法 rcsetup.py matplotlibrc

    文章目录 from `__init__.py` from matplotlibrc from rcsetup.py from __init__.py # this is the instance us ...

  7. python2.x和python3.x-matplotlib中文显示为方块-中文不显示-故障原理研究与解决

    matplot的字体问题,有以下3种方式 一种是从pylab中进行全局管理,可以管理任意实验相关的字体,可以是和matplot无关的实验的字体问题的管理 一种是matplot的配置文件,进行全局管理 ...

  8. figma下载_如何在Figma中创建逼真的3D对象

    figma下载 by Gbolahan Taoheed Fawale 通过Gbolahan Taoheed Fawale 如何在Figma中创建逼真的3D对象 (How to create reali ...

  9. 转贴:Icon Design Guidelines, Android 2.0

    原文地址:http://androidappdocs.appspot.com/guide/practices/ui_guidelines/icon_design.html Icon Design Gu ...

最新文章

  1. CentOS下python-mysqldb安装
  2. 晓庄学院计算机科学分数,2016南京晓庄学院艺术类专业录取分数线
  3. Spring Boot API 接口文档 Swagger 入门
  4. bootstrap 垂直居中 布局_CSS3 flex 布局必须要掌握的知识点
  5. java演练 数组的逆序文字玩法 你是猪才怪
  6. RecycleView拖拽、侧滑删除
  7. eclipse安装超帅主题----darkest dark
  8. elementui实现横向时间轴_element ui step组件在另一侧加时间轴显示
  9. 一个https神奇的故事
  10. Openstack rocky 部署四: neutron 部署与验证(控制节点)
  11. 免费语音转文字的软件有哪些?快来看看这几个软件
  12. win11 删除自带的微软输入法
  13. Git生成密钥(ssh)
  14. Spring+quartz 动态任务调度
  15. 2007-05-13
  16. 学计算机不会重装系统正常吗,电脑那点事 篇一:不会重装windows操作系统?6 分钟就能学会!...
  17. 关于移动端rem与px换算的计算方式
  18. 软件测试-offer选择,自研or外包
  19. 使用python抓取喜馬拉雅音樂並且下載
  20. 2006“IBM杯”中国高校SOA应用大赛禁止使用任何版本的GPL/LGPL license的开源软件

热门文章

  1. 格雷希尔连接器G10/G15系列与它的升级款G10Pro/G15Pro的区别
  2. 游标卡尺数字乱跳修复方法
  3. android 电源/充电/库仑
  4. 自动关机批处理bat,一行代码实现自动关机
  5. BAT掌舵人 马云李彦宏马化腾的星座故事
  6. mybatis:configuration must match (properties?,settings?,typeAliase.....
  7. python http代理_python HTTP代理中转服务
  8. 快速实现Excel到ODX/PDX数据文件的自动转换工具:VisualODX—ODX
  9. 谷歌云盘大文件下载失败解决方案
  10. KOA 初探 洋葱模型