如何把把一个透明按钮经过的MapView? [英] How put put one transparent button over mapview?

查看:145
本文介绍了如何把把一个透明按钮经过的MapView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出透明(图下可见)按钮上的MapView?
我怎样才能做到这一点?

I would like to put transparent (map visible under it) button over mapview? How can i achieve that?

推荐答案

尝试在按钮上使用此
机器人:背景=@空或
机器人:背景=@机器人:彩色/透明
编辑:
放置在使用相对布局:

Try using this on the button android:background="@null" or android:background="@android:color/transparent" to place over use a relative layout:

<?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">
<com.google.android.maps.MapView android:id="@+id/google_maps"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:apiKey="@string/maps_key"/>
<Button android:id="@+id/googlemaps_select_location"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:text="Select"/>
</RelativeLayout>

这篇关于如何把把一个透明按钮经过的MapView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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