在百度地图上添加浮动按钮 & 相对布局

在百度地图上添加浮动按钮


使用相对布局就可以

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >
    
    <WebView
        android:id="@+id/webView"
        android:visibility="gone"
        android:layout_marginTop="@dimen/normal_margin"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
       />

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:layout_marginBottom="56dp"
        android:layout_marginRight="58dp"
        android:text="Button" />

</RelativeLayout>

猜你喜欢

转载自blog.csdn.net/qq_28938403/article/details/51478082
今日推荐