Hello,
bacause if i just use R.layout.other_layout without to initialize it
( what normally happens by setContentView with R.layout.man ),
the trys to access layout components will fails.
Thx to xingye, it is neccessary to "inflate" the "other" layout
before use it:
ViewInflate viewInflate = (ViewInflate) getSystemService("inflate");
LinearLayout other_layout = (LinearLayout)
viewInflate.inflate( R.layout.other_layout, null, null );
cheers,
vitali
On 2 Apr., 02:19, xingye <[EMAIL PROTECTED]> wrote:
> Maybe ViewInflate can help you.
>
> On Apr 2, 3:46 am, "Dan U." <[EMAIL PROTECTED]> wrote:
>
>
>
> > I don't understand quite what you are asking. Why not just have
> > R.layout.main, R.layout.other_layout, R.layout.another_layout and just
> > select the one you want?
>
> > On Apr 1, 8:23 am,vitali<[EMAIL PROTECTED]> wrote:
>
> > > Hello,
>
> > > how to use ( or just is it possible at all ) to use
> > > layout definitions in separate XML files in one application ?
>
> > > i.e => dynamicly create Views from different XML files as
> > > R.layout.main
>
> > > Thx,
> > > -vitali- Hide quoted text -
>
> > - Show quoted text -- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---