Thursday, June 30, 2011

Listview cheats


Do you have a dymanically changing listView  then always use the tag("fill_parent")instead of  ("wrap_content") for its height for the list view.Android will redraw the listview whenever it find wrap content  on adapter.notifydatasetchange and if the list   is not  load use textview with the parameter below to fill the listview space


android:id="@android:id/empty"
android:layout_width="fill_parent"
android:layout_height="fill_parent"(ie only work when used with list with below parameter is used
android:id="@android:id/list"
android:layout_below="@id/header"
android:layout_width="fill_parent"
android:layout_height="fill_parent")

Monday, June 27, 2011

How to get past the internal storage error in android emulator


To get pass internal storage error

use this command

emulator -avd emulatorname -partition-size 150
this will increase memory of the internal storage of the emulator to 150 mb