Android : Graphical layout in eclipse doesn't work with inserted fragment

on Friday, October 31, 2014


I'm using Eclipse ADT and I'm having a problem with a layout file. I can open it the internal xml editor, but when I open the Graphical Layout tool, it doesn't show anything, as if there was no xml file there.


This is the xml code



<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.hermes.view.activities.SubTaskActivity" >
<fragment
android:id="@+id/map_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="35"
android:layout_marginBottom="15dp"
android:name="com.hermes.view.fragments.MiniMapFragment"/>
<ListView
android:id="@+id/list_subtaks"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="60" />
</LinearLayout>


Note: I wanted to show a screenshot of the Graphical Layout tool, but StackOverflow doesn't allow it for reputation stuff :/


Is this an eclipse bug or am I doing something from with the xml file. I must also say that this only happens if I put a fragment in the xml file; if I remove the fragment tag, the problem disappear, but I need to see the design with the fragment in it !.


Thanks for the help


0 comments:

Post a Comment