如何设置布局与图形页面 [英] How to Set Layout with Mapview

查看:99
本文介绍了如何设置布局与图形页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建其中读音字使用图形页面中的应用。现在我想使用后退按钮在我的那个图形页面。我有发展布局,但它不能看到在图形页面的按钮。当我从模拟器然后按返回键的MapView成为亲密和后退按钮所示。
可以anybudy帮助我如何显示后退按钮上的MapView。 ?
谢谢你。

I have created the Application in which i m Using MapView. Now i want to Use the Back Button in My that MapView. I have develop the Layout but it cant seen the Button over mapview. When i push back button from Emulator then the Mapview become close and the Back button is shown. Can anybudy help me How to Show Back Button on the MapView. ? Thanks.

推荐答案

博基本上它可能与覆盖,但我一直在使用RelativeLayout的东西做到了

Bo basically it may be possible with the overlays but I have done it using RelativeLayout stuff

<RelativeLayout
    android:id="@+id/headerlayout" 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    >

    <Button android:id="@+id/amap_back_btn" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true" android:text="Back">
    </Button>

</RelativeLayout>

<MapViewActivity
    xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:clickable="true" android:apiKey="your map key"
    android:layout_below="@+id/headerlayout"
    android:layout_above="@+id/bottomlayout" 
    />

这是所有如果你觉得正确的,不要忘记,以纪念我的答案检查。最好的问候,阿努普

This is all If you find it correct dont forget to mark my answer as check. Best Regards,Anup

这篇关于如何设置布局与图形页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆