2014-09-24 75 views
0

我希望把与谷歌地图里面的按钮布局与渐变背景在此应用中的按钮:布局与谷歌地图

enter image description here

我已经做了很多组合,但他们没有工作。我如何才能做到这一点?

回答

1

它只是把相对布局内的地图和按钮,它为我的作品

<RelativeLayout 
    android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:background="@android:color/transparent"> 
<com.google.android.gms.maps.MapView 
    android:id="@+id/map" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_below="@+id/textView_for_welcome" 
    android:apiKey="@string/live_key_for_map" 
    android:clickable="true" > 
</com.google.android.gms.maps.MapView> 
    <LinerLayout 
    android:id="@+id/textView_for_welcome" 
    android:layout_width="fill_parent" 
    android:layout_height="80dp" 

    android:background="@drawable/backgroud_layout" 
    android:gravity="center" 
    > 
     ----inside put all ur Views ---- 
</LinerLayout> 
     </RelativeLayout> 

也使用按钮渐变背景(或任何布局)U想要的,但重要的是ü必须指定下一个映射

您可以使用backgroud_layout.xml

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android"> 
<gradient 
    android:startColor="#AA474946" 
    android:endColor="#FFFFFFFF" 
    android:angle="270"/> 
<corners android:radius="5dp" /> 
</shape> 

来绘制文件夹 使用FF-FF阿尔法红FF-FF蓝,绿

+0

我在哪里放置按钮布局的渐变背景? – user4152 2014-09-24 10:50:04

+0

android:background =“#AAFF4a4a” – SelvaMariappan 2014-09-24 11:19:26

+0

请检查我最迟的答案 – SelvaMariappan 2014-09-24 11:41:40