Comments (3)
1:在SweetToast的initConfiguration里面有一行
params.type = WindowManager.LayoutParams.TYPE_PHONE;
你把这句换成 params.type = WindowManager.LayoutParams.TYPE_TOAST;
或者
params.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
试一下能不能解决;
2:1如果解决不了你再看一下是不是有权限没有打开;我没款机器,暂时验证不了。
from sweettips.
params.type = WindowManager.LayoutParams.TYPE_TOAST;这句代码可以,我试了华为 魅蓝note2 OPPO vivo 都可以,但是华为弹出需要一个权限问题,他默认关闭的。这个权限是个麻烦事。
from sweettips.
恩,在6.0以上会涉及到权限问题。还是挺烦的,网上有一些权限动态申请的文章,可以继续把代码继续优化一下
from sweettips.
Related Issues (5)
- Toast背景颜色 HOT 1
- 怎么不搞个aar地址 HOT 1
- 请问,在dialog存在的情况下,这个snakebar显示在dialog的阴影之下,怎么解决! HOT 3
- 发现华为Android9.0,Demo能显示,但引用进工程却怎么也显示不了的解决方案 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sweettips.