Issue
I have a layout which uses a ViewFlipper to keep a tabbar visible at all times throughout the app.
The main activity extends TabActivity. For one of my views I want to have a mapview, I have tried this code to no success:
<ViewFlipper android:id="@+id/layout_tab_one"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<ListView android:id="@+id/listview"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="myapikey">
</com.google.android.maps.MapView>
<ListView android:id="@+id/lazylistview"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
<include android:id="@+id/cell1" layout="@layout/detail" />
<ListView android:id="@+id/listview2"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
</ViewFlipper>
The app crashes on launch. I have put the user library for google maps into the manifest and I am also running the app using the Google API, still no luck. Any suggestions? Thanks!
Solution
Either your device or emulator does not have Google Maps, or possibly you are inflating this layout from something other than a MapActivity
.
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.