2

Problem : There was no problem when app was using

Theme.MaterialComponents.Light.NoActionBar

But was not using any MDC elements in Layout like (TextInputLayout etc).

Then i replaced Editext with TextInputLayout and Button with Material Button.

Now here the problem comes.

When i run my app, i see the screen goes blank. Just pure white.

I checked Layout isses. I found there're 7 warnings and 2 errors(Render problem).

The Render problems are as -

  1. Path.op() not supported. (As was it suggests i refreshed the layout many times. Doesn't work)

  2. java.awt.geom.IllegalPathStateException: missing initial move to in path definition

This is what i have tried -

  1. Downgrading my MDC dependency (how to solve render problem Path.op() not supported?)
  2. Clean project, rebuild and restart Android studio

Please help me to solve this strange issue. I want to use MDC in my project.

Thank you.

1 Answers1

0

I would suggest you should first make use of the Bridge then, gradually override the parent theme attributes based on your requirement design.

In AndroidManifest.xml

 android:theme="@style/MyMaterialTheme"

Then under style.xml. it would like something like

<style name="MyMaterialTheme" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorPrimary</item>
    <item name="android:windowBackground">@color/white</item>

    <item name="toolbarStyle">@style/BlueToolbar</item>
</style>
   

try referring reference , reference

Simple solution is make your theme extend a Bridge theme :) I hope this helps

Denny Mathew
  • 842
  • 3
  • 13
  • 31