Skip to content

Border radius is not working on Android API 17 #1000

Closed

Description

@lscown

screen shot 2015-10-29 at 5 48 23 pm

This is a simplified version of our xml:

<Border class="list-icon" backgroundColor="#FAFAFA" borderColor="black">
    <Label color="red" class="icon-letter" text="H"/>
</Border>

and the CSS:

.list-icon {
  border-width: 2;
  horizontal-align: center;
  vertical-align: center;
  margin: 0 0 0 15;
  border-radius: 22;
  width: 44;
  height: 44;
}
.icon-letter {
  horizontal-align: center;
  vertical-align: center;
  font-size: 16;
}

Activity

  1. vchimev commented on Oct 30, 2015

    @vchimev
    Contributor

    Hi @lscown,

    We managed to reproduce the issue and will look into it.

  2. added this to the milestone on Oct 30, 2015
  3. self-assigned this
    on Nov 9, 2015
  4. vakrilov commented on Nov 9, 2015

    @vakrilov
    Contributor

    It look like some of the canvas APIs (forexample canvas.clipPath(path)) we are using are unsupported if hardware accelerations is enabled.

    The solution is to use software layer for the view:

    imageView.android.setLayerType(android.view.View.LAYER_TYPE_SOFTWARE, null);
    
  5. bradmartin commented on Nov 10, 2015

    @bradmartin
    Contributor

    @vakrilov - is there a negative performance impact by using this on images? What about buttons? Border-radius doesnt work on my device (issue ref above) so wondering if the same internal canvas code is used on buttons? Thanks!

  6. vakrilov commented on Nov 10, 2015

    @vakrilov
    Contributor

    @bradmartin
    There might a negative performance impact - for example if rounded borders are used on many elements on a page - please refer to hardware acceleration article. However, keep in mind that:

    • This fix forces software layer only if android API level is below 18 (which means - only 17 as it is a minimum supported by native-script)
    • Software layer is used only for views that have rounded corners - so it won't impact other elements.

    About the Canvas API-s we are using - you can check them here. Probably the canvas.clipPath(path) call was causing the issue with rendering - according to the article above it is supported on after API lvl 18.

  7. added
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    and removed on Nov 10, 2015
  8. added and removed
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    on Nov 10, 2015
  9. modified the milestones: 1.5, on Nov 10, 2015
  10. lock commented on Aug 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  11. locked and limited conversation to collaborators on Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions