急急急!!Fragment的问题,在线等

爱coding的卖油翁 2014-11-12 02:40:53
求大神帮忙看看。


这是布局文件。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<include
android:layout_width="match_parent"
android:layout_height="@dimen/dp100"
layout="@layout/layout_home_actionbar"
android:visibility="visible" />

<RelativeLayout
android:id="@+id/layout_home_content"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >

<LinearLayout
android:id="@+id/layout_home_linear"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>

<include
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
layout="@layout/layout_loading"
android:visibility="visible" />
</FrameLayout>

<include
android:layout_width="match_parent"
android:layout_height="@dimen/dp80"
android:layout_alignParentBottom="true"
layout="@layout/layout_hint"
android:visibility="gone" />
</RelativeLayout>

</LinearLayout>

个人猜想是这一句报错,但不知道怎么改。
ft.add(R.id.layout_home_linear, aboutFragment, "AboutFragment");
...全文
128 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
引用 1 楼 bdmh 的回复:
错误说你那个id没有视图 http://blog.csdn.net/mengliluohua_151/article/details/9012305 看看是不是这个原因
谢谢大神,已解决,问题的原因不是那样的。
bdmh 2014-11-12
  • 打赏
  • 举报
回复
错误说你那个id没有视图 http://blog.csdn.net/mengliluohua_151/article/details/9012305 看看是不是这个原因

80,337

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧