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
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
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'.
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
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
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 )'
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,
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
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
9 matches
Mail list logo