Git Product home page Git Product logo

shadowlayout's Introduction

ShadowLayout

说明

这是一个是边上带阴影的Layout,当然不仅仅可以是阴影,只要是渐变都可以。

效果图

使用

依赖

implementation 'com.shouzhong:ShadowLayout:1.0.1'

代码

这里提供了ShadowLayout(继承自FrameLayout)、ShadowLinearLayout、ShadowRelativeLayout,如果想在自定义View中使用的话,继承View的请在onDraw方法中调用,继承ViewGroup请在dispatchDraw方法中调用

ShadowUtils.setShadow(Canvas canvas, Paint paint, int width, int height, int shadowWidth, int startColor, int endColor, int ltRadius, int lbRadius, int rtRadius, int rbRadius);

属性说明

属性 说明
slWidth 阴影宽度
slStartColor 阴影起始颜色
slEndColor 阴影结束颜色
slRadius 圆角
slLeftTopRadius 左上圆角,优先级大于slRadius
slLeftBottomRadius 左下圆角,优先级大于slRadius
slRightTopRadius 右上圆角,优先级大于slRadius
slRightBottomRadius 右下圆角,优先级大于slRadius

shadowlayout's People

Contributors

shouzhong avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.