android - make views inside Layout match custom shape of layout -


i have custom semicircle liner layout in want add colored views , these views not match custom shape(or stay within bounds of liner layout)

when assigned custom shape views

custom shape

when assign match_parent views

match parent

i want views fill inside of liner layout while retaining shape of it, there way can done?

you can't create custom shape view. views rectangular. if mean have custom background, doesn't make view group custom shape, or effect layout of views within group. if want that, need override onlayout (and possibly onmeasure) , layout individual children bounds expect them in. not surprised if ugly or non-functional results this- views weren't made circular.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -