码迷,mamicode.com
首页 > 移动开发 > 详细

android 给imageView,文字等加上阴影[记录]

时间:2017-07-21 15:58:19      阅读:411      评论:0      收藏:0      [点我收藏+]

标签:roi   color   pil   ado   mic   height   find   https   效果   

1.链接

https://github.com/Devlight/ShadowLayout

2.效果

技术分享

 

3.code

compile ‘com.github.devlight.shadowlayout:library:1.0.2‘
 <com.gigamole.library.ShadowLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:sl_shadow_angle="2"
        app:sl_shadow_color="#000"
        android:id="@+id/sl"
        app:sl_shadow_distance="5dp"
        app:sl_shadow_radius="1dp"
        app:sl_shadowed="true">
        <ImageView
            android:layout_width="100dp"
            android:id="@+id/ls"
            android:layout_height="100dp"
            android:src="@mipmap/menu_stick" />
    </com.gigamole.library.ShadowLayout>
        final ShadowLayout shadowLayout = (ShadowLayout) findViewById(R.id.sl);
        shadowLayout.setIsShadowed(true);
        shadowLayout.setShadowAngle(45);//阴影角度
        shadowLayout.setShadowRadius(20);//阴影半径
        shadowLayout.setShadowDistance(30);//阴影距离
        shadowLayout.setShadowColor(Color.DKGRAY);//阴影颜色

 

android 给imageView,文字等加上阴影[记录]

标签:roi   color   pil   ado   mic   height   find   https   效果   

原文地址:http://www.cnblogs.com/galibujianbusana/p/7217311.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!