Hi,
I'm stuck in this issue for a while now.. went around forums, books
(M.Murphy, R.Meier) and I did not find any real helpful threads..
My main activity is a ListActivity, where the view(main.xml) contains a
ListView
and a ViewFlipper
just below. For each selected line in my ListView i want to update the
content of the ViewFlipper.
Based on two buttons, my ViewFlipper would switch between the MapView and
a basic LinearLayout. As far
as i understand i should inflate my MapView but I did not find any
informatio about how to do that..
Of course I'm aware that a MapActivity should appear somewhere..
If someone could provide me a link to a snippet code or answer me with a
sample code it would be great!!
(the other option is to start a new activity based on a MapActivity where i
would not need to inflate anthing, but it would not
be so nice)
Thanks,
Pedro
Here below my main.xml:
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=match_parent
android:layout_height=match_parent
android:orientation=vertical
!-- android:background=#77ff --
LinearLayout
android:id=@+id/linearLayout1
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=0.3
Button
android:id=@+id/prevViewFlipperButt
android:layout_width=wrap_content
android:layout_height=wrap_content
android:onClick=onPrevChangeViewFlipper
android:text=PREV /
Button
android:id=@+id/nextViewFlipperButt
android:layout_width=wrap_content
android:layout_height=wrap_content
android:onClick=onNextChangeViewFlipper
android:text=NEXT /
/LinearLayout
ListView
android:id=@android:id/list
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1
android:cacheColorHint=# /
ViewFlipper
android:id=@+id/viewFlipperFromListView
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=1
include
android:id=@+id/flipper1
layout=@layout/details_flipper_view /
include
android:id=@+id/flipper2
layout=@layout/map_flipper_view /
/ViewFlipper
TextView
android:id=@+id/selectionTxtView
android:layout_width=fill_parent
android:layout_height=0dp
android:layout_weight=0.3
android:textSize=44sp /
/LinearLayout
details_flipper_view.xml:
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/PochtroDetailsFlipperLayout
android:layout_width=match_parent
android:layout_height=match_parent
android:orientation=vertical
TextView
android:id=@+id/textView1
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Large Text
android:textAppearance=?android:attr/textAppearanceLarge /
TextView
android:id=@+id/textView4
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Small Text
android:textAppearance=?android:attr/textAppearanceSmall /
/LinearLayout
map_flipper_view.xml:
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/frame android:orientation=vertical
android:layout_width=wrap_content android:layout_height=wrap_content
com.google.android.maps.MapView
android:id=@+id/map_view
android:apiKey=XX
android:enabled=true
android:clickable=true
android:layout_height=wrap_content
android:layout_width=fill_parent /
/LinearLayout
--
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