Skip to content

View goes missing if the last element has a corner radius #1

@leffsu

Description

@leffsu

View goes missing if the last element has a corner radius. Example shown in the example section very conveniently puts a slice after the slice with a corner radius, so it works. Unfortunately, it does not work on its own.

Issue encountered on API 27.

Code below works fine.

    view.addSlice(new Slice.Builder("  3.5/10  ")
            .backgroundColor(Color.parseColor("#800736"))
            .textColor(Color.WHITE)
            .setCornerRadius(13)
            .build());

    view.addSlice(new Slice.Builder("   John   ")
            .textColor(Color.parseColor("#FFFFFF"))
            .backgroundColor(Color.parseColor("#000000"))
            .setCornerRadius(13)
            .build());

    view.addSlice(new Slice.Builder("     ").build());

    view.display();

Code below makes the whole view go invisible and outputs no errors.

    view.addSlice(new Slice.Builder("  3.5/10  ")
            .backgroundColor(Color.parseColor("#800736"))
            .textColor(Color.WHITE)
            .setCornerRadius(13)
            .build());

    view.addSlice(new Slice.Builder("   John   ")
            .textColor(Color.parseColor("#FFFFFF"))
            .backgroundColor(Color.parseColor("#000000"))
            .setCornerRadius(13)
            .build());

    view.display();

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions