如图我现在想把图上方黑色背景去掉,设为透明,即也可显示地图,不知咋修改,这是xml,高人指点一下
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#0000ff">
<TextView  
android:id="@+id/myLocationText"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"/>
<LinearLayout 
    android:orientation="horizontal"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" >
    <Button 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:layout_weight="1" 
        android:text="放大"
        android:id="@+id/in"/>
    <Button 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:layout_weight="1" 
        android:text="缩小"
        android:id="@+id/out"/>
</LinearLayout> <ToggleButton 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:textOff="卫星视图(关)" 
    android:textOn="卫星视图(开)"
    android:id="@+id/switchMap"/>
<com.google.android.maps.MapView
android:id="@+id/myMapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="0bpcyai0byXJk5juSxIZOmtfuiCvJWl3B6UR4BQ"/>
</LinearLayout>

解决方案 »

  1.   

    将所有的android:background设为"#000000ff"试试
      

  2.   

    在manifest文件里面加android:theme="@style/Theme.Translucent"透明主题
      

  3.   

    黑色背景是系统默认的,那是因为你上面没有任何东西所以显示黑色的
    按说你设置的android:background="#0000ff"应该管用才对,
    设置为android:background="@drawable/bgColor"试试,bgColor可以是一张图片,或者一个位于drawable目录下的设置颜色的xml文件。
      

  4.   

    不可能吧。你在values下面建一个styles.xml了吗?
      

  5.   

    嗯?styles.xml的内容如何写呢?
      

  6.   


    android:theme="@android:style/Theme.Translucent" 
      

  7.   

    哥们,能把你这个DEMO发到邮箱吗?我真好在找google地图的使用!
         如果你能发就发到[email protected]!
           不胜感激……