Cannot open XML files in Graphical Layout: FakeAdapter cannot be cast to BaseAdapter

android, eclipse, java

Solution

It might be the

android:fastScrollAlwaysVisible="true"

that is bugging your application. Try deleting it.

Problem

I'm having some problems with my android project in eclipse. I have two XML layout files, and both contain ListViews. The ListViews are working perfectly on my Android phone, but eclipse wont open the design window, giving the following error: ``` com.android.layoutlib.bridge.impl.binding.FakeAdapter cannot be cast to android.widget.BaseAdapter ``` Both files contains the following code: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <ListView android:id="@+id/cardList" android:layout_width="match_parent" android:layout_height="wrap_content" android:fadeScrollbars="true" android:fastScrollAlwaysVisible="true" android:fastScrollEnabled="true" android:scrollbarSize="30dp" android:scrollbarStyle="insideOverlay" > </ListView> </LinearLayout> ``` Any suggestions?

Original source