a TabView ? I am aware of a TabSpec. i couldn't find it in the
documenation.  can you show how ?

On May 8, 2:50 pm, Hielko <[EMAIL PROTECTED]> wrote:
> Yeah, but that's no problem: you can simply display an activity inside
> a tabview. That's also how we have implemented our mapview with tabs.
>
> On May 8, 1:52 pm, WildLuka <[EMAIL PROTECTED]> wrote:
>
> > I have already tried it, with no joy.  I get "error inflating class",
> > an InflateException. instances of MapView can only occur in
> > MapActivity's ...
>
> > On May 8, 11:38 am, zero <[EMAIL PROTECTED]> wrote:
>
> > > yeah, i did that without problems, too.
> > > don't have the code anymore, because i wanted the tab for two maps,
> > > and that
> > > realy won't work because MapActivity is restricted to one mapView, it
> > > seems.
> > > Anyway, for one MapView it's easy, you're almost there wiht your code.
> > > Just forget about the setcontent intent and in your xml file add the
> > > mapview
> > > directly
> > >                        <LinearLayout android:id="@+id/content2"
> > >                                 android:orientation="vertical"
> > >                                 android:layout_width="fill_parent"
> > >                                 android:layout_height="fill_parent"
> > >                                 android:background="#ff99ccff" >
>
> > >                                 <MapView android:id="@+id/myMapView"
>
> > > android:layout_width="fill_parent"
>
> > > android:layout_height="wrap_content"
>
> > >                         </LinearLayout>
> > > then just call tab2.setContent(R.id.content2);
> > > and that should be all.
>
> > > On May 8, 10:35 am, WildLuka <[EMAIL PROTECTED]> wrote:
>
> > > > great mind sharing ?
>
> > > > On May 8, 1:47 am, Hielko <[EMAIL PROTECTED]> wrote:
>
> > > > > We have an activity inside a tabview with a map without problems...
>
> > > > > On 7 mei, 23:00, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
> > > > > > WildLuka wrote:
> > > > > > > If I substitute the Intent with a LinearLayout, just as for tab1, 
> > > > > > > the
> > > > > > > example works perfectly.  and it's not just a MapActivity, the
> > > > > > > NullPointerException is thrown with any activity.
>
> > > > > > Oh, sorry, I interpreted your "that's it!" from your preceding 
> > > > > > message
> > > > > > as meaning things were working for you.
>
> > > > > > Off the cuff, my guess is that perhaps
> > > > > > TabHost.TabSpec#setContent(Intent) isn't fully working yet, which 
> > > > > > means
> > > > > > your desired UI might not be possible. Perhaps a Googler could 
> > > > > > confirm this.
>
> > > > > > If true, the only near-term hope I can think of is to do one of the
> > > > > > following:
>
> > > > > > 1. Put a MapView in your TabsActivity directly (i.e., via the 
> > > > > > layout)
> > > > > > and hope you can reimplement whatever portion of the MapActivity 
> > > > > > support
> > > > > > you need
>
> > > > > > 2. Put the TabHost in your MyMapActivity and hope you can 
> > > > > > reimplement
> > > > > > whatever portion of the TabActivity support you need
>
> > > > > > Personally, I'd be nervous about a map in a tab anyway -- the tab 
> > > > > > strip
> > > > > > takes up a fair chunk of screen real estate, and I don't know how 
> > > > > > small
> > > > > > of a screen Android might wind up running on. You might be better 
> > > > > > served
> > > > > > just by launching MyMapActivity as a separate regular activity via a
> > > > > > button or the options menu.
>
> > > > > > And, again, with luck, somebody else who has better ideas will 
> > > > > > chime in
> > > > > > on this thread...
>
> > > > > > --
> > > > > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > > > > The Busy Coder's Guide to Android Development -- coming in June 
> > > > > > 2008!- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to