shadow

shadow

项目地址:loopeer/shadow 

简介:Android custom shadow view, can replace your CardView

更多:作者   提 Bug   

标签:

 

This library draw android view shadow by ShadowLayer. You may don't like the CardView's black shadow which we can't change it's color. Same to CardView wrap content and set shadow radius. You can change shadow color, foreground color and corner radius everywhere. Because the shadow is draw in the view. So you must add space to draw the shadow. The ShadowView add one param shadowMargin which must be set before you add shadow radius to the view.

Caveat: Margin In UI~ = layout_margin + shadow_margin(Add by ShadowView)

Download Sample

Screenshot

HHH
Change RadiusChange foregroundChange Corners
Change shadow colorChange shadow marginDemo

Installation

dependencies {
    compile 'com.loopeer.lib:shadow:0.0.4-beta3'
}

Usages

<com.loopeer.shadow.ShadowView
    android:id="@+id/shadow_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="12dp"
    android:elevation="10dp"
    android:foreground="?attr/selectableItemBackground"
    android:onClick="onShadowClickTest"
    android:padding="10dp"
    app:cornerRadius="4dp"
    app:shadowMargin="20dp"
    app:shadowRadius="14dp">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Google Developer Days Europe 2017 took place in Krakow, Poland. In this playlist, you can find all the recorded sessions from the event, across all tracks (Develop on Mobile, Mobile Web, Beyond Mobile, and Android)."/>
</com.loopeer.shadow.ShadowView>

Attribute

android:foreground
shadowMargin
shadowMarginTop
shadowMarginLeft
shadowMarginRight
shadowMarginBottom
cornerRadius
cornerRadiusTL
cornerRadiusTR
cornerRadiusBL
cornerRadiusBR
foregroundColor
shadowColor
shadowDx
shadowDy
shadowRadius
backgroundColor
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值