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.
精彩评论