开发者

Apply style to child-views

开发者 https://www.devze.com 2023-03-23 07:12 出处:网络
I am looking for a way to apply style to the childs of a开发者_开发问答 tableLayout (tableRow and Textview), the same way we do in css:

I am looking for a way to apply style to the childs of a开发者_开发问答 tableLayout (tableRow and Textview), the same way we do in css:

.style > childElementType { properties ... }

I would like to achieve the same behavior with my android Styling, meaning that I want to change for instance child's backgrounds depending on their types.

Is it possible?

Thanks, Antoine


pseudocode

function {

  1. loop on all children

  2. if(child.class=="classname") -> set Style

}

0

精彩评论

暂无评论...
验证码 换一张
取 消