question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Chip] Layout preview window does not render Chip elements

See original GitHub issue

Description: After upgrading to version 1.2.0-alpha03 the layout preview window does not render Chip elements. They are drawn completely blank without any background, stroke, text or icons. This is solely a visual issue with the preview window as Chips are properly rendered when running on a device. The preview window messages show the following render problems:

  • Path.op() not supported
  • java.awt.geom.IllegalPathStateException: missing initial moveto in path definition

These elements are properly rendered when using version 1.2.0-alpha02

Expected behavior: Chips should be rendered properly in the preview window. This is using 1.2.0-alpha03 This is using 1.2.0-alpha02

Source code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

        <com.google.android.material.chip.Chip
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="This chip should be visible"
            android:theme="@style/Widget.MaterialComponents.Chip.Choice"/>

</LinearLayout>

Android API version: 23

Material Library version: 1.2.0-alpha03

Device: Android Studio 3.5.3 Build #AI-191.8026.42.35.6010548, built on November 15, 2019

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:29 (7 by maintainers)

github_iconTop GitHub Comments

19reactions
pappbence96commented, Jan 29, 2020

The issue is still present in 1.2.0-alpha04

4reactions
kungpaogaocommented, Jan 22, 2021

Okay, I did some more digging, and it turns out that enabling “Use new Layout Rendering Engine” under the “Experimental” section in settings fixed it for me!!

This is the post that suggested the fix: https://stackoverflow.com/questions/64060759/render-problem-path-op-not-supported-in-latest-material-design-version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android material chip component crashing app. Unable to ...
In my case, val chip = new Chip(context) and val chip = layoutInflater.from(context).inflate were both failing despite my material theme. This ...
Read more >
Chips - Android Developers
The Chip component is an interactive compact element that represents an input, attribute, or action. Anatomy. Chips can contain up to two text ......
Read more >
Chips – Material Design 3
Chips help people enter information, make selections, filter content, or trigger actions. Chips can show multiple interactive elements together in the same ...
Read more >
React Chip component - Material UI - MUI
Chips are compact elements that represent an input, attribute, or action. ... so some of the behavior demonstrated here is not shown in...
Read more >
Chip component — Vuetify
Vuetify is a Material Design component framework for Vue.js. ... No ripple. v-chip can be rendered without ripple if ripple prop is set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found