[android-developers] Re: 1.1 to 2.0: dalvik.system.PathClassLoader can't locate its own classes?

2009-11-26 Thread Kennard Consulting
Thanks fadden. I'll give it a try. 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] 1.1 to 2.0: dalvik.system.PathClassLoader can't locate its own classes?

2009-11-24 Thread Kennard Consulting
Hi guys, I'm trying to migrate my 1.1 app to 2.0. I'm seeing the following stack trace: java.lang.ClassNotFoundException: org.metawidget.android.widget.AndroidMetawidget at org.metawidget.config.ConfigReader.configure (ConfigReader.java:324) at

[android-developers] Android unnecessarily hard to unit test?

2009-10-08 Thread Kennard Consulting
Hi guys, First: thanks for a great platform in Android. Being able to write Android apps in regular Java is a huge win. However, I am confused about unit testing Android apps. Many of the 'best practices' seem to boil down to 'split your business logic off, and test it separately using JUnit'.

[android-developers] Re: is there any setStyle method?

2009-02-08 Thread Kennard Consulting
Dianne, I tried going down the 'declare-styleable' route as you suggested. I'm a bit stuck because 'declare-styleable' needs to be placed in a 'attrs.xml' file, which gets compiled to R.java in the package specified by the 'package' attribute in AndroidManifest.xml. But I am creating a View for

[android-developers] Re: is there any setStyle method?

2009-02-05 Thread Kennard Consulting
Dianne, I believe you can pass in null for it. No. That doesn't seem to work. If I do 'new TextView( context, null, myStyleId )' the label appears but the style is not applied. If I do 'new EditView( context, null, myStyleId )' the textbox doesn't appear at all (maybe it has zero width?). The

[android-developers] Re: What is the 'correct' way to set styles programmatically?

2009-02-04 Thread Kennard Consulting
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 )'

[android-developers] Re: is there any setStyle method?

2009-02-04 Thread Kennard Consulting
Romain, Dianne pointed me to your post. When you say: The style can be passed to a view's constructor. Note the poster says he has an R.style.MyStyle. So which constructor accepts an id? I only see ones that accept AttributeSets. Is there a way to create an AttributeSet from an id? Regards,

[android-developers] What is the 'correct' way to set styles programmatically?

2009-02-03 Thread Kennard Consulting
Dear All, Given a widget and a int that references a style (defined in my res/ values/style.xml), what is the 'correct' way to programmatically apply the style to the widget? Up until now I've been hacking this by... protected void applyStyle( View view, int style ) { TypedArray

[android-developers] Re: What is the 'correct' way to set styles programmatically?

2009-02-03 Thread Kennard Consulting
Dianne, Thanks for the prompt reply. However, I don't think your answer works in my case, as what I am trying to do is a little unusual. I'm trying to apply styles *programmatically*, like the Android framework does internally using (I think) AssetManager.applyStyle and/ or