2016-12-15 8 views
0

カードビューが開始する場所で最初の画像に含まれていたマップフラグメントを、2番目の画像での方法と同様にして取得するにはどうすればよいですか。あなたはカードビューのlayout_heightを定義した場合カードビューの下に隠された地図断片の底面

First Image

Second Image

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_height="match_parent" 
android:layout_width="match_parent" 
xmlns:app="http://schemas.android.com/apk/res-auto"> 

<fragment 
android:id="@+id/map" 
android:name="com.google.android.gms.maps.SupportMapFragment" 
android:layout_width="match_parent" 
android:layout_height="470dp" 
tools:context="com.example.donal.navdrawer.Activities.MapsActivity"/> 

<android.support.v7.widget.Toolbar 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/maps_toolbar" 
    android:layout_height="?attr/actionBarSize" 
    app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
    android:background="?attr/colorPrimaryDark" 
    android:layout_width="match_parent" 

    /> 

<android.support.v7.widget.CardView 
    android:id="@+id/card_view" 
    android:layout_gravity="bottom" 
    android:layout_width="match_parent" 
    android:layout_height="100dp" 
    android:elevation="4dp"> 
</android.support.v7.widget.CardView> 

</FrameLayout> 
+0

MapFragmentではなくMapViewを使用して、必要なビルドレイアウトを作成します。 – Divers

+0

MapFragmentの代わりにMapViewを使用することができます。このリンクを確認すると便利です [https://developers.google.com/android/reference/com/google/android/gms/maps/MapView](https://developers.google) .com/android/reference/co.jp/google/android/gms/maps/MapView) –

答えて

0

、あなたはこのフラグメントはすべて取ることを確認します。1.に0dpと重量にフラグメントの高さを設定することができます空き容量

+0

ありがとうございました!出来た。 –

+0

@Donal harringtonno問題 –

関連する問題