Comments (7)
你好,不调用初始化代码对SmartSnackbar的显示风格做修改的话,是不需要的。你有对风格做修改么,右侧控件的底色不正常啊。不看代码,我无法猜测。随便举个原因,右侧控件默认文字颜色是colorAccent,你主题的colorAccent是否与控件底色是一样的,所以看不到。贴一段具体的代码过来。我帮你分析。我的微信w361281607,可实时联系我
from smart-show.
哦 好的 我去改下风格试试,主要是我懒嘛 想着用默认的样式。 谢谢!
from smart-show.
如果真是上述原因,你可以调用初始化代码修改右侧控件的颜色。不要修改你主题的colorAccent,因为这个颜色是全局的,会影响很多颜色,如Edittext的下划线颜色和光标颜色等。你完全可以调用初始化代码,只修改SmartSnackbar右侧控件的颜色。不过一般习惯上就用默认colorAccent这是UI设计规范。
SmartSnackbar.init(this)
//设置动作文本颜色,有可选方法,直接以颜色值为参数
.actionColorRes(R.color.blue)
.processView(new ProcessViewCallback() {
@Override
public void processSnackbarView(Snackbar.SnackbarLayout layout,
TextView msgView, TextView actionView) {
//处理代码
...
}
});
如果解决请告知我一下,还有问题直接发消息,我帮你解决。谢谢你的支持!
from smart-show.
帅哥,问题解决了么?
from smart-show.
啊 放假啦 没看这个 抱歉抱歉~~
刚写了下试试 初始化设置了颜色就可以了
from smart-show.
但是你的你的1.0.3版本似乎依赖不下来 不知道是不是我的编译器问题
from smart-show.
不会的,1.0.2和1.0.3就只多了个方法而已,各种配置一样的,是为了某个读者而推出的,应该是你的依赖没配置好,把你的配置语句还有报的错误截图给我。另外,初始化时,不需要的部分不用调,只改颜色调那一句就可以,后面的那个方法用来获得这两个控件,然后进一步的定制化。
常见的需要修改的属性都有方法,可见文档。
另外初始化要在application中进行哦,不然别的页面显示SmartSnackbar时,如果没在其他地方初始化过,就不会表现出你初始化的效果。
1.0.3是可以正常依赖的
from smart-show.
Related Issues (20)
- Program type already present: com.coder.zzq.smartshow.dialog.BranchDialog
- android 11闪退 HOT 1
- 3.0.3版本吐司内存泄漏 HOT 1
- 3.1.0版本不能依赖,版本号一提升就报错。 HOT 1
- SmartToast.classic()设置白色背景色无效 HOT 5
- 继承NormalDialog自定义布局
- 库自带的Dialog大小怎么调整呢? HOT 2
- NullPointerException HOT 2
- 使用自定义SmartShow异常IllegalArgumentException HOT 2
- 魅族pro6s toast闪退 HOT 2
- javax.annotation.processing.FilerException HOT 3
- 2s内间隔不停调用SmartToast.show() toast dismiss后会一直不显示 HOT 1
- NPE
- Could not download toast.aar (com.github.zhiqiang-series.smart-show:toast:3.1.9): No cached version available for offline mode HOT 1
- You need to use a Theme.AppCompat theme (or descendant) with this activity. HOT 1
- java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable.mutate()' on a null object reference #23 HOT 2
- SmartSnackBar show()方法 java无法调用,只有三参数结构show方法 HOT 1
- lateinit property application has not been initialized HOT 6
- java.lang.NullPointerException HOT 1
- 4.x之后 Java调用起来很不方便啊 HOT 2
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 smart-show.