开发者

Apply style to child-views

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜