android - Using Google Maps as "Overlay" on another Layout/View -


i have little problem. app has surfaceview , displays camera preview. want map overlay. overlay should displayed in corner of display , show current position of user.

here's preview image of i'd have: full res image

my problem is, don't know how display view/layout on another. have @ moment main.xml:

<?xml version="1.0" encoding="utf-8"?> <relativelayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent" >     <linearlayout          android:id="@+id/camerapreviewlayout"         android:layout_width="fill_parent"         android:layout_height="fill_parent"         android:orientation="vertical" >         <framelayout              android:id="@+id/surfaceviewlayout"              android:layout_width="wrap_content"              android:layout_height="wrap_content"              android:src="@drawable/ic_launcher" />     </linearlayout>     <linearlayout         android:id="@+id/mapslayout"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:clickable="false"         android:orientation="vertical" >         <fragment             android:id="@+id/map"             android:layout_width="match_parent"             android:layout_height="match_parent"             class="com.google.android.gms.maps.mapfragment" />      </linearlayout> </relativelayout> 

but shows preview layout + , - button of maps-layout.

is possible that? cause i'm searching while , find nothing.

hope has idea.

regards

update: here new main_activity.xml

<?xml version="1.0" encoding="utf-8"?> <relativelayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent" >         <framelayout             android:id="@+id/surfaceviewlayout"             android:layout_width="fill_parent"             android:layout_height="fill_parent"             android:src="@drawable/ic_launcher" />         <fragment             android:id="@+id/map"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             class="com.google.android.gms.maps.mapfragment" /> </relativelayout> 


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -