[android-developers] Re: Activity and view inflation
Ok. But how to do if I want onCreateView() to be called when the views of the layout is created? Or is this callback supposed to be used differently, and if so, how? /Michael On 5 Maj, 05:24, Second Dancer wrote: > TreKing had given you the answer. If you wanna iterate the views, you may > use methods like getChildAt() > > 2010/5/4 Michael Scott > > > > > > > Well, I could I guess, but what I was looking for was a way to iterate > > through the views in a layout to do some common stuff to them. Say for > > instance that I would like to set the background for all buttons > > dynamically, then it would be neat to do it just after creation. > > Anyway, the question still is: why doesn't onCreateView() get called? > > /Michael > > > On 3 Maj, 01:34, TreKing wrote: > > > On Sun, May 2, 2010 at 2:39 PM, Michael Scott > > wrote: > > > > I have an Acitivity and I would like to fiddle with the views upon > > creation > > > > Can't you just findViewById(int) for whichever view you want to fiddle > > with > > > and set whatever properties you want on if after you get it? After > > calling > > > setContentView() of course. > > > ----- > > > TreKing - Chicago transit tracking app for Android-powered deviceshttp:// > > sites.google.com/site/rezmobileapps/treking > > > > -- > > > 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 athttp:// > > groups.google.com/group/android-developers?hl=en > > > -- > > 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 > > -- > --- > Thanks > > -- > 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 > athttp://groups.google.com/group/android-developers?hl=en- Dölj citerad text - > > - Visa citerad text - -- 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
Re: [android-developers] Re: Activity and view inflation
TreKing had given you the answer. If you wanna iterate the views, you may use methods like getChildAt() 2010/5/4 Michael Scott > Well, I could I guess, but what I was looking for was a way to iterate > through the views in a layout to do some common stuff to them. Say for > instance that I would like to set the background for all buttons > dynamically, then it would be neat to do it just after creation. > Anyway, the question still is: why doesn't onCreateView() get called? > /Michael > > > On 3 Maj, 01:34, TreKing wrote: > > On Sun, May 2, 2010 at 2:39 PM, Michael Scott > wrote: > > > I have an Acitivity and I would like to fiddle with the views upon > creation > > > > Can't you just findViewById(int) for whichever view you want to fiddle > with > > and set whatever properties you want on if after you get it? After > calling > > setContentView() of course. > > > > > ----- > > TreKing - Chicago transit tracking app for Android-powered deviceshttp:// > sites.google.com/site/rezmobileapps/treking > > > > -- > > 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 athttp:// > groups.google.com/group/android-developers?hl=en > > -- > 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 > -- --- Thanks -- 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
[android-developers] Re: Activity and view inflation
Well, I could I guess, but what I was looking for was a way to iterate through the views in a layout to do some common stuff to them. Say for instance that I would like to set the background for all buttons dynamically, then it would be neat to do it just after creation. Anyway, the question still is: why doesn't onCreateView() get called? /Michael On 3 Maj, 01:34, TreKing wrote: > On Sun, May 2, 2010 at 2:39 PM, Michael Scott wrote: > > I have an Acitivity and I would like to fiddle with the views upon creation > > Can't you just findViewById(int) for whichever view you want to fiddle with > and set whatever properties you want on if after you get it? After calling > setContentView() of course. > > ----- > TreKing - Chicago transit tracking app for Android-powered > deviceshttp://sites.google.com/site/rezmobileapps/treking > > -- > 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 > athttp://groups.google.com/group/android-developers?hl=en -- 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