1

지도가 이와 같이 보이도록 Android Fragment의 디자인을 조정할 수 있습니까?Android지도 디자인 변경

enter image description here

+0

참조를 사용하여지도 스타일을 지정할 수 있습니다 9.6.0 : http://gis.stackexchange.com/questions/104325/how-to-use -custom-map-tiles-with-the-google-map-api-v2-for-android –

답변

1

그래서, 알면이 같은 것을 추가해야

<?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> 

@ 드로어 블/map_white_overlay은 흰색 페이드 이미지가 될 것입니다 경우. 디자이너에게 PSD에서 가져 오거나 여하튼 그것을 얻으려고 요청하십시오. 구글 플레이 서비스에서지도 스타일로

, 당신이 link

1

대신 구글지도의 MapBox 사용할 수 있습니다. 그런 다음지도를 맞춤 설정할 수 있습니다.

+0

정확히 내가 필요로하는 것은 아니지만, 지금 내 레이아웃을 사용자 정의해야합니다. 지금은 안드로이드 네이티브 리소스, 애니메이션, 블러, 색상을 가지고 있습니다. , 등등 ... –

+0

는 이미지를 귀하의 레이아웃과 예상 한 레이아웃으로 게시합니다. –

1

완전히 가능합니다.

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <FrameLayout 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_weight="1"> 

     <com.google.android.gms.maps.MapView 
      android:layout_width="match_parent" 
      android:layout_height="0dp" 
      android:id="@+id/mapView2"/> 

     <Space 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="@drawable/some_9patch_drawable_with_white_sides"/> 

     <EditText 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_margin="30dp" 
      android:text="Search text here" 
      android:ems="10" 
      android:id="@+id/editText" /> 

    </FrameLayout> 

    <TextView 
     android:text="Your actions down here" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:id="@+id/textView" /> 

</LinearLayout> 

내가 가장 어려운 부분은 9 패치를 생성 할 것이라고 생각 : 나는 당신이 (당신이 Fragment의 자신의 서브 클래스에서 사용할 수있는) 레이아웃 XML에있는 모든 일을 할 수있는 다음과 같은 뭔가가 필요 어떻게 생각 흰색면이있는 드로어 블 (drawable)을 사용하면지도가 비슷하다고 생각하는 것을 모방 할 수 있습니다.

+0

안녕하세요, 당신의 대답에 감사드립니다. 나는 이와 비슷한 것을 할 수밖에 없으며, 나는 달성하고자하는 효과의 이름이 무엇인지 알 필요가있다. –

+1

내가 아는 한 백색 페이드 효과를 얻기위한 해결책은 없지만'FrameLayout'의'MapView' 위에 그린 배경 패치 9 드로어 블 가능이 작동합니다 (https://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch를 참조하십시오. – paleolimbot