How To Implement Android Fragment Transaction .add Syntax Error
I'm would like to make my Android application use Fragment Transactions, so that I can switch between various Fragments display their associated lists. My application worked fine
Solution 1:
If you are already using the add
method of FragmentTransaction
you must not include the <fragment
tag in your layout. What if you just left your main activity XML like this:
<?xml version="1.0" encoding="utf-8"?><FrameLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:id="@+id/fragment_container"android:layout_width="match_parent"android:layout_height="match_parent"/>
Post a Comment for "How To Implement Android Fragment Transaction .add Syntax Error"