Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling issues with Androidx material design lib #28

Open
wezley98 opened this issue Jan 16, 2019 · 6 comments
Open

Styling issues with Androidx material design lib #28

wezley98 opened this issue Jan 16, 2019 · 6 comments

Comments

@wezley98
Copy link

wezley98 commented Jan 16, 2019

Can you add a public method to allow us to overrider the snackbar layout background colour to resolve the issue seen below please?

Following code is used to display:

Rate.Builder(this)
            .setSnackBarParent(root_layout)
            .setFeedbackAction(Uri.parse(Constants.EMAIL_ADDRESS))
            .build()
            .apply {
                count()
                showRequest()
            }

screenshot_1547671560

@mlagerberg
Copy link
Member

Hi, I'll add a method, as I can see how that would be a useful feature for many people. For the time being, you could probably get what you need by tweaking your theme or trying this:

  • call .setLightTheme(true/false) on the builder, or:
  • set the global Snackbar background color by adding a color with this specific name to your resources:
    <color name="design_snackbar_background_color" tools:override="true">#ff9900</color>. This option only works if setLightTheme is set to false.

@wezley98
Copy link
Author

Thanks, I will take a look and report back if this works.

@wezley98
Copy link
Author

Setting setLightTheme(false) and adding <color name="design_snackbar_background_color" tools:override="true">#ff9900</color> as suggested above has no effect.

screenshot_1548334499

@wezley98
Copy link
Author

also setLightTheme(true) has the following (Notice the give feedback button text is wrong)

screenshot_1548334682

@wezley98
Copy link
Author

wezley98 commented Feb 8, 2019

@mlagerberg any progress with this, or should I raise a pull request?

@m-i-n-a-r
Copy link

I'm having the same layout problems. In my case, every button in the dialog has a background (colorPrimary), but the feedback button doesn't look good since it's placed to the right edge of the dialog. This library needs a refresh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants