Android map 设计更改

标签 android fragment android-mapview android-design-library

是否可以对android Fragment进行设计调整,使 map 看起来像这样?

enter image description here

最佳答案

因此,您需要添加如下内容:

<?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.gms.maps.MapView
            android:id="@+id/map"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />


    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitXY"
        android:src="@drawable/map_white_overlay" />

</RelativeLayout>

@drawable/map_white_overlay 将是您的白色渐变图像。要求设计师从他的 psd 中获取它或尝试以某种方式自己获取它。

至于 map 样式,从 google-play-service 9.6.0 开始,您可以使用此 link 设置 map 样式。

关于Android map 设计更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40305868/

相关文章:

android - Activity和Fragment之间如何回调?

android - MapView 渲染,中间缺少 "x"的图 block

javascript - PhoneGap + 谷歌地图 API v3 : Not displaying (at all) on Android

android - 从 Activity 类中重构 performCrop() 方法

android - 诊断 ANR 的一般指南

java - 如何将前一个 Activity 的 Intent 附加信息传递给 Activity 及其内部的 fragment

java - 为什么我的 Java 对象被复制或 finalize() 被调用两次?

选项卡中的 Android : How to Navigate from one fragment to another ,?

android - 通过四舍五入坐标矩形缓存覆盖 - 如何?

android - 由于 MapView 导致 Activity 崩溃