android线性布局只有一个,android – 同一屏幕中的两个线性布局

嗨我试图设计我的

Android手机和平板电脑的应用程序.所以我已经设计了它,但需要重新设计用于不同屏幕的缩放目的.

这是我想要的布局.

xmlns:tools="http://schemas.android.com/tools"

android:id="@+id/LinearLayout"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="vertical"

android:background="@color/white">

android:id="@+id/linearLayout1"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:weightSum="2"

android:orientation="horizontal" >

android:id="@+id/map"

android:layout_marginTop="5dp"

android:layout_weight=".1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

class="com.google.android.gms.maps.MapFragment"

/>

android:id="@+id/button3"

android:layout_weight=".25"

android:layout_marginLeft="34dp"

android:layout_marginTop="10dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:onClick="ClickTourismButton"

android:text="@string/Tourism" />

android:id="@+id/button4"

android:layout_weight=".25"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginLeft="34dp"

android:text="@string/Nearby" />

android:id="@+id/button2"

android:layout_weight=".25"

android:layout_marginLeft="34dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="@string/Favourites" />

android:id="@+id/button1"

android:layout_weight=".25"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginLeft="34dp"

android:text="@string/Map" />

android:id="@+id/linearLayout2"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:weightSum="2"

android:orientation="horizontal" >

android:layout_marginLeft="10dp"

android:layout_marginTop="5dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:textIsSelectable="true"

android:id="@+id/feedupdate1" />

android:id="@android:id/list"

android:background="@color/red"

android:layout_weight="1"

android:layout_marginTop="5dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginLeft="10dp"/>

android:id="@+id/empty"

android:textIsSelectable="true"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginLeft="10dp"

android:layout_marginTop="5dp"/>

android:id="@+id/feedupdate"

android:layout_marginLeft="6dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="430dp"

android:textIsSelectable="true"/>

android:id="@+id/list1"

android:background="@color/blue"

android:layout_weight="1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="430dp"

android:layout_marginLeft="6dp" />

当我运行应用程序时,两个线性布局是相互叠加的?或者上面看到的黑色矩形的地图片段占据了所有的屏幕???我不知道我做错了什么,我看了几个教程,似乎没错?

需要帮助

谢谢

xmlns:tools="http://schemas.android.com/tools"

android:id="@+id/LinearLayout"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="horizontal"

android:weightSum="2"

android:background="@color/white">

android:id="@+id/linearLayout1"

android:layout_width="0dp"

android:layout_height="match_parent"

android:layout_weight="1"

android:orientation="vertical" >

android:id="@+id/map"

android:layout_marginTop="5dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

class="com.google.android.gms.maps.MapFragment"

/>

android:id="@+id/button3"

android:layout_marginLeft="34dp"

android:layout_marginTop="10dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:onClick="ClickTourismButton"

android:text="@string/Tourism" />

android:id="@+id/button4"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginLeft="34dp"

android:text="@string/Nearby" />

android:id="@+id/button2"

android:layout_marginLeft="34dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="@string/Favourites" />

android:id="@+id/button1"

android:layout_width="wrap_content"

android:layout_height="0dp"

android:layout_marginLeft="34dp"

android:text="@string/Map" />

android:id="@+id/linearLayout2"

android:layout_width="0dp"

android:layout_height="match_parent"

android:layout_weight="1"

android:orientation="vertical" >

android:layout_marginLeft="10dp"

android:layout_marginTop="5dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:textIsSelectable="true"

android:id="@+id/feedupdate1" />

android:id="@android:id/list"

android:background="@color/red"

android:layout_marginTop="5dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginLeft="10dp"/>

android:id="@+id/empty"

android:textIsSelectable="true"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginLeft="10dp"

android:layout_marginTop="5dp"/>

android:id="@+id/feedupdate"

android:layout_marginLeft="6dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="430dp"

android:textIsSelectable="true"/>

android:id="@+id/list1"

android:background="@color/blue"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_marginTop="430dp"

android:layout_marginLeft="6dp" />

一个组件占据每一方面?

它分成两部分,但地图片段占据了所有的一面,第一个listview占用了所有其他的???

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值