When I try to show an android xml file in the graphical layout in Eclipse I get this message: pick preview layout from the Fragment Layout context menu. I follow the instruction by right clicking the layout --> Fragment Layout --> Choose layout. However, when I try to choose my layout (the file that of some reason can't be displayed) I get this error: "Cyclic include, not valid". I can choose all other layouts such as androids predefined list_content.
What am I doing wrong?
Here is my xml:
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/example_id"
android:name="com.example.test.MainFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
and here is my java:
public class MainActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Here is a print screen: