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

styles: Switch AppTheme to MaterialComponents #114

Merged
merged 1 commit into from May 17, 2020
Merged

styles: Switch AppTheme to MaterialComponents #114

merged 1 commit into from May 17, 2020

Conversation

ix5
Copy link
Contributor

@ix5 ix5 commented May 16, 2020

Fixes a crash when opening the "About" page.

The dependency "AboutLibraries" contains a layout named listheader_opensource.xml, which contains references to com.google.android.material.button.MaterialButton.
That one in turn requires the base app theme to be a descendant of Theme.MaterialComponents:

android.view.InflateException: Binary XML file line #48 in \
  com.ruesga.rview.debug:layout/listheader_opensource: \
  Binary XML file line #48 in com.ruesga.rview.debug:layout/listheader_opensource: \
  Error inflating class com.google.android.material.button.MaterialButton
Caused by: java.lang.IllegalArgumentException: \
  The style on this component requires your app theme to be \
  Theme.MaterialComponents (or a descendant).

@jruesga This is quite ugly, do you think only styling the AboutLibraries fragment could work instead? They suggest using something akin to defining a CustomAboutLibrariesStyle with `parent="Theme.MaterialComponents.Light.NoActionBar", see the README


Btw, still haven't forgotten about the F-Droid submission, got a lot on my plate though ;)

The dependency "AboutLibraries" contains a layout named
listheader_opensource.xml, which contains references to
com.google.android.material.button.MaterialButton.
That one in turn requires the base app theme to be a
descendant of `Theme.MaterialComponents`:

```
android.view.InflateException: Binary XML file line #48 in \
  com.ruesga.rview.debug:layout/listheader_opensource: \
  Binary XML file line #48 in com.ruesga.rview.debug:layout/listheader_opensource: \
  Error inflating class com.google.android.material.button.MaterialButton
Caused by: java.lang.IllegalArgumentException: \
  The style on this component requires your app theme to be \
  Theme.MaterialComponents (or a descendant).
```
@jruesga
Copy link
Owner

@jruesga jruesga commented May 16, 2020

@ix5 it's ok to me. I will merge this one. Thanks for the patch.

@jruesga jruesga merged commit c441f1e into jruesga:master May 17, 2020
1 check passed
@ix5 ix5 deleted the theme-material-aboutpage branch May 17, 2020
@ix5 ix5 changed the title [WIP] styles: Switch AppTheme to MaterialComponents styles: Switch AppTheme to MaterialComponents May 17, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants