开发者

Android set style in constructor

I am creating UI dynamically in my code. I know it's impossible to switch between styles via code at runtime, but how can I a开发者_开发百科ssign the style while creating object?

I want to use something like:

 ListView listView = new ListView(this, null, R.style.listViewStyle);

Thanks.


Seems like it's not possible. The closest solution is to create an XML file describing the ListView and then just inflate a View.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜