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
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,
I believe you can pass in null for it.
On Wed, Feb 4, 2009 at 6:37 PM, Kennard Consulting
rich...@kennardconsulting.com wrote:
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
Textview supports setTextAppearance if I remember correctly.
On Feb 2, 2009 2:22 AM, skink psk...@gmail.com wrote:
Dianne Hackborn napisał(a):
Sorry there is no way to change the style/theme that a view is using after
is is created.
thank you Dianne,
but what about dynamic setStyle in the
Well you'll need to define dynamic theme. What specifically are you asking
about?
On Mon, Feb 2, 2009 at 1:58 AM, Paranoia zheny...@gmail.com wrote:
so android does not support dynamic theme, right?
do you guys have any plan to support it?
On Feb 2, 10:36 am, Dianne Hackborn
so android does not support dynamic theme, right?
do you guys have any plan to support it?
On Feb 2, 10:36 am, Dianne Hackborn hack...@android.com wrote:
Sorry there is no way to change the style/theme that a view is using after
is is created.
On Sun, Feb 1, 2009 at 4:30 PM, skink
Romain Guy wrote:
Textview supports setTextAppearance if I remember correctly.
indeed ! Textview supports public void setTextAppearance(Context
context, int resid)
so its even more mystery that there is no generic View.setStyle(int
resid) method
for example:
suppose i want also change
Supporting dynamic style change is much more complicated than just
changing the text appearance. It is not supported at the moment,
that's all.
On Mon, Feb 2, 2009 at 11:14 AM, skink psk...@gmail.com wrote:
Romain Guy wrote:
Textview supports setTextAppearance if I remember correctly.
Dianne Hackborn napisał(a):
Sorry there is no way to change the style/theme that a view is using after
is is created.
thank you Dianne,
but what about dynamic setStyle in the future releases? imagine i have
a label (TextViev) that normally in plain/white/15dip but when
something is wrong
The style can be passed to a view's constructor.
On Feb 1, 2009 5:28 PM, skink psk...@gmail.com wrote:
hi,
i created my style in styles.xml, lets say MyStyle.
i can use it in any layout file by style=@style/MyStyle.
also my generated R class have R.style.MyStyle, my question is if i
can use
On 1 Lut, 22:34, Romain Guy romain...@google.com wrote:
The style can be passed to a view's constructor.
thanks Romain for your reply, but i think it's equivalent of setting
style in xml - it's static.
what about setting the style after the View is constructed - that way
style could be
12 matches
Mail list logo