AnnBnnCnnD 2013-06-13 09:05 采纳率: 0%
浏览 31504

framelayout显示在最上层

有一个id为listLayout的框架布局,包含一个button。需要这个框架布局显示在其他id为news_fragment 的框架之上。

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <FrameLayout
        android:id="@+id/listLayout"
        android:layout_weight="1"
        android:layout_width="0dp"
        android:layout_height="wrap_content">

        <Button
            android:id="@+id/lists"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:background="@drawable/btn_black_xml"           
            android:padding="8dp"
            android:text="List"
            android:textColor="#ffffff"
            android:textSize="20dp" />

        </FrameLayout>


    <FrameLayout
              android:id="@+id/news_fragment"
              android:layout_weight="2"
              android:layout_width="0dp"              
              android:layout_height="match_parent">



        </FrameLayout>

    <FrameLayout
              android:id="@+id/channel_fragment"
              android:layout_weight="3"
              android:layout_width="0dp"
              android:layout_height="match_parent" />

</LinearLayout>

请高手帮忙实现。谢谢

  • 写回答

3条回答 默认 最新

  • JaveZh 2013-06-13 09:10
    关注

    两个layout外面套一个framelayout不就是

    评论

报告相同问题?