Skip to content Skip to sidebar Skip to footer

Unfortunately Hellolistview Has Stopped

I've followed this tutorial but when I try to run the application I get Unfortunately HelloListView has stopped The IDE gives no warnings or errors. My HelloViewListActivity.java l

Solution 1:

You have to add setContentView(R.layout.yourlayout) after the super.onCreate(savedInstanceState);

the R.layout.yourlayout should look like this ( in folder res/layout ) :

<?xml version="1.0" encoding="utf-8"?><ListViewandroid:id="@android:id/list"android:layout_width="fill_parent"android:layout_height="wrap_content" />

Solution 2:

When you extend ListActivity, you need to have an xml which contains id as @android:id/list, then in your activity you need to setContentView(R.layout.yourxmlName); Here is tutorial.

Post a Comment for "Unfortunately Hellolistview Has Stopped"