改为fragmentManager = getFragmentManager();试试
getFragmentManager()是获取Android.app.FragmentManager的,getSupportFragmentManager()是获取 android.support.v4.app.FragmentManager的,你看看你是属于哪一种fragmentmanager
getFragmentManager()是获取Android.app.FragmentManager的,getSupportFragmentManager()是获取 android.support.v4.app.FragmentManager的,你看看你是属于哪一种fragmentmanager
解决方案 »
- Andrid Skia EncodeFile 背景为黑色
- android系统稳定性问题
- 五分钟更新定位,用LocationManager.requestLocationUpdate行不
- 求一份能够在线播放音乐,视频的demo,100分献上
- android 开发用什么手机好 晒晒你们的手机
- android监听软键盘问题
- 【基础问题】Waiting for HOME ('android.process.acore') to be launched...
- 强银们!手机Android和塞班到底有啥区别?哪个好啊?
- adb 修改设备时间不成功
- 有人知道怎么修改sharesdk框架的分享界面的样式吗?
- GridView控件的行间距
- RelativeLayout中两个控件怎么居中显示
谢谢,getFragmentManager() 和 getSupportFragmentManager()两种都试了,还是一样的结果
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.timetracker.TimeTrackerActivity"
tools:ignore="MergeRootFrame" />frame_time_tracker.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fragment_tracker"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
tools:context="com.example.timetracker.TimeTrackerActivity$TimeTrackerFragment" ></LinearLayout>