GithubHelp home page GithubHelp logo

liuzhenhuanet / shapedview Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 442 KB

圆形、圆角,以及各种特殊形式的ImageView和TextView

License: MIT License

Java 100.00%
round-imageview round-textview round-corners circle-imageview half-round-imageview half-round-textview any-shape-imageview any-shape-textview hollow-imageview

shapedview's Introduction

这个仓库是什么?

这个仓库是一个Android View开源库,仓库集合了各种形状的ImageView、各种形状的TextView,除此之外,还有各种镂空的ImageView。以下截图只是这个开源代码应用的一部分。

截图中的圆形的狗狗是使用CircleImageView显示的,它的原图是

圆形狗狗下面的那张图还是同一张狗狗图片,是使用ShapedImageView显示的,只不过是使用了下面这张星星图片作为狗狗图的显示区域
星星图
最下面的图片是使用RoundImageView显示的,四个圆角的圆角弧度都可以在xml布局文件中指定
狗狗和猫猫

原理

使用Android中的画笔Paint的Xfermode的各种模式来实现ImageView图片形状的切割、镂空。

shapedview's People

Contributors

liuzhenhuanet avatar

Watchers

 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.