Thanks again for your help, Dianne. My apologies for not making myself clear: my original code was just a hack. I would rather not manually retrieve the values and call setters on a view.
So are you saying if I want to programmatically style a view I must not use, say, 'new TextBox( context )' but rather 'new TextBox ( context, attributeSet )'? That's okay. In that case is there a way I can obtain an AttributeSet given a style id? For example, do I pass a home-made implementation of AttributeSet to Theme.obtainStyledAttributes() and it will populate it for me? I tried this in the past but there seemed to be some kind of hard-coded cast to XmlBlock$Parser inside Theme.obtainStyledAttributes? Regards, Richard. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---