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

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

Open
leffsu opened this issue Apr 2, 2019 · 0 comments
Open

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

leffsu opened this issue Apr 2, 2019 · 0 comments
Assignees
Labels

Comments

@leffsu
Copy link

leffsu commented Apr 2, 2019

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();
@milaptank milaptank self-assigned this Aug 2, 2019
@milaptank milaptank added the bug label Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants