我试图显示SearchResultBaseFragment(类名)片段,有时它不可见但片段代码在后台运行,如何找出错误,log cat什么都没显示......
RewriteEngine On
RewriteCond %{HTTP_HOST} !^example.com$
RewriteRule ^ http://example.com%{REQUEST_URI} [NE,L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
Fragment currentFragment = new SearchResultBaseFragment();
fragmentTransaction
.add(R.id.frame_container, currentFragment)
.setCustomAnimations(R.anim.frg_slide_for_in,
R.anim.frg_slide_for_out,
R.anim.frg_slide_back_in,
R.anim.frg_slide_back_out)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.addToBackStack(null);
fragmentTransaction.commitAllowingStateLoss();
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/mainLayout"
android:background="@color/white"
>
<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</FrameLayout>
<include
android:id="@+id/actionBarRootLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout="@layout/actionbar_layout"
android:layout_alignParentBottom="true" />
</RelativeLayout>