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

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?

Answers


It might be the

android:fastScrollAlwaysVisible="true"

that is bugging your application. Try deleting it.


Need Your Help

Multiple nested form in a HABTM relation

ruby-on-rails nested-forms nested-attributes has-and-belongs-to-many

I'm fighting with this bug for the past few hours and I can't make sense of it and my researches didn't give an answer.

Adding json result to a form action url

javascript php jquery html json

I want to add the result coming back from the json to the end of my form action.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.