Giter Club home page Giter Club logo

globalgray's Introduction

GlobalGray

一个可以让应用全局变灰的库。

Demo

demo

依赖

在你项目的build.gradle文件中添加jitpack的仓库

allprojects {
	repositories {
		...
        maven { url 'https://jitpack.io' }
    }
}

然后在你要使用的模块中添加如下依赖:

dependencies {
    implementation 'com.github.U2tzJTNE:GlobalGray:1.0'
}

代码示例

Application的onCreate中调用:

GlobalGray.enable(true);

已知存在的问题

  1. 开启了View的硬件加速,可能会存在兼容性问题
  2. 对于SurfaceView和Textureview以及其子类无效

对于问题1笔者在项目中暂未遇到问题,如果读者朋友们在项目中遇到兼容性问题,欢迎留言;

对于问题2其原因是因为这两个组件内部有独立的绘图表面(Surface),笔者目前未想到好的解决方案,如果有思路欢迎一块交流。

博客地址

https://juejin.cn/post/6892277675012915207

globalgray's People

Contributors

u2tzjtne 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.