tôi có phân đoạn lồng nhau có chứa chế độ xem bản đồ, tất cả các chế độ xem được chồng chéo như tôi mong đợi ngoại trừ chế độ xem bản đồ. tôi có một recyclerview quá .. mà hiển thị theo bố cục cắt, nhưng bản đồ trong không.cách bố cục bố cục bản đồ trong máy nhắn tin chế độ xem
Ảnh chụp màn hình:
kết quả tôi nhận được là:
và kết quả là những gì tôi mong đợi:
tôi đã cố gắng với thiết lề nagative nhưng nó không làm việc cho mapview.
mã: fragment_around.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.stratafy.activities.SignupActivity">
<LinearLayout
android:clipToPadding="false"
android:layout_marginTop="160dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<RelativeLayout
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="230dp"
android:background="@drawable/background_aroundme">
<ProgressBar
android:id="@+id/mProgressbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TabLayout
android:padding="0dp"
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="50dp"
android:background="#00000000"
app:tabIndicatorColor="#00000000"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/white"
app:tabTextAppearance="@style/CustomTextStyle2"
app:tabTextColor="@color/white" />
<LinearLayout
android:gravity="center"
android:layout_gravity="center"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:id="@+id/ll1"
android:gravity="center"
android:layout_gravity="center"
android:background="@color/colorAccent"
android:layout_width="50dp"
android:layout_height="2dp"></LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:visibility="gone"
android:orientation="vertical"
android:id="@+id/ll2"
android:layout_gravity="center"
android:background="@color/colorAccent"
android:layout_width="50dp"
android:layout_height="2dp"></LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_below="@id/background"
android:layout_marginTop="-90dp"
android:orientation="vertical">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_filter"
android:src="@drawable/ic_filter"
app:fabSize="normal"
android:layout_marginRight="20dp"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
margin-top = 160 bắt đầu nơi nút nổi là .. và bản đồ của tôi là tại 240dp.
fragment_map.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapFragmentContainer"
android:layout_width="match_parent"
android:layout_marginTop="-70dp"
android:layout_height="match_parent"
android:orientation="vertical">
</FrameLayout>