Giter VIP home page Giter VIP logo

Comments (7)

vincent-series avatar vincent-series commented on June 5, 2024

你好,不调用初始化代码对SmartSnackbar的显示风格做修改的话,是不需要的。你有对风格做修改么,右侧控件的底色不正常啊。不看代码,我无法猜测。随便举个原因,右侧控件默认文字颜色是colorAccent,你主题的colorAccent是否与控件底色是一样的,所以看不到。贴一段具体的代码过来。我帮你分析。我的微信w361281607,可实时联系我

from smart-show.

chengwf avatar chengwf commented on June 5, 2024

哦 好的 我去改下风格试试,主要是我懒嘛 想着用默认的样式。 谢谢!

from smart-show.

vincent-series avatar vincent-series commented on June 5, 2024

如果真是上述原因,你可以调用初始化代码修改右侧控件的颜色。不要修改你主题的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.

vincent-series avatar vincent-series commented on June 5, 2024

帅哥,问题解决了么?

from smart-show.

chengwf avatar chengwf commented on June 5, 2024

啊 放假啦 没看这个 抱歉抱歉~~
刚写了下试试 初始化设置了颜色就可以了

image

image

from smart-show.

chengwf avatar chengwf commented on June 5, 2024

但是你的你的1.0.3版本似乎依赖不下来 不知道是不是我的编译器问题

from smart-show.

vincent-series avatar vincent-series commented on June 5, 2024

不会的,1.0.2和1.0.3就只多了个方法而已,各种配置一样的,是为了某个读者而推出的,应该是你的依赖没配置好,把你的配置语句还有报的错误截图给我。另外,初始化时,不需要的部分不用调,只改颜色调那一句就可以,后面的那个方法用来获得这两个控件,然后进一步的定制化。
常见的需要修改的属性都有方法,可见文档。
另外初始化要在application中进行哦,不然别的页面显示SmartSnackbar时,如果没在其他地方初始化过,就不会表现出你初始化的效果。
1.0.3是可以正常依赖的
image

from smart-show.

Related Issues (20)

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.