<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"/>
<LinearLayout android:id="@+id/image_count"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:background="#00000000">
</LinearLayout>
<fragment
android:id="@+id/map1"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
class="com.google.android.gms.maps.MapFragment" />
</LinearLayout>
它創建ViewPager片段和線性佈局(該線性佈局示出了具有使用點的選擇的當前頁面)和地圖的空間分段。我想要的是將當前位於XML佈局中間的線性佈局放置在ViewPager和NOT BELOW IT上。我該怎麼做。我在FrameLayout上嘗試過我的手,但它弄亂了一切。
關於使用RelativeLayout,一切都消失了。我附上了有關使用相對佈局的LinearLayout – user1377504