Sunday, May 16, 2010

Re: [android-developers] Re: How to load more than one layout file for an activity

ThomasWrobel wrote:
> I'm also having trouble with this.
> I can get the View using the Inflator;
>
> final View loginpage = factory.inflate(R.layout.loginpage, null);
>
> and I can get an object from within it....
>
> final LinearLayout LoginForm =
> (LinearLayout)loginpage.findViewById(R.id.MainLoginPage);
>
> But I cant seem to use this object in a Tab...
>
> spec = tabHost.newTabSpec("LoginTab").setIndicator("Login",
> res.getDrawable(R.drawable.eye))
> .setContent(LoginForm.getId());
>
> tabHost.addTab(spec);
>
> Says the ID isn't recognised :-/
>
> any ideas?

Delete ".getId()" from your setContent() call.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate