leelugen 2016-08-04 06:33 采纳率: 100%
浏览 4448
已采纳

新手 android Fragmentlayout里的内容不显示

<?xml version="1.0" encoding="utf-8"?>
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">

<fragment
    android:id="@+id/left_fragment"
    android:name="com.llg.play.LeftFragment"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_weight="1"
   />
<!--name 显示指明要添加的碎片类名-->
<FrameLayout
    android:id="@+id/right_layout"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_weight="1">

    <fragment
        android:id="@+id/right_fragment"
        android:name="com.llg.play.RightFragment"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
      />

</FrameLayout>


  • 写回答

9条回答 默认 最新

  • leelugen 2016-08-04 10:00
    关注

    是 Fragmentlayout 里放了fragment 里的布局错误 ==

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(8条)

报告相同问题?