hi I have a problem in this line I do not know why
FragmentManager manager = getFragmentManager();
FragmentTransaction trans = manager.beginTransaction();
trans.replace(R.id.containerr,new FragmentLastComments());
trans.commit();
xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/containerr"
android:layoutDirection="ltr">
</RelativeLayout>
fragment xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layoutDirection="ltr">
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginTop="55dp"
android:orientation="vertical">
<TextView
android:id="@+id/txt_lastcomments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:textSize="20dp"
android:layout_marginBottom="10dp"
android:text="last comments" />
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginRight="5dp"
android:layout_marginLeft="5dp"
android:id="@+id/rv_lastcomments"/>
</LinearLayout>
</RelativeLayout>
this line is not working
trans.replace(R.id.containerr,new FragmentLastComments());
When I remove this line I'm not getting any problem but when I'm using this line I'm getting problem I think the problem here
R.id.containerr
I hope someone will help me to solve this