views:

51

answers:

2

Hi

I am currently trying to use the android library android fu to help me with my first proper app.

I am trying to makea test project using the droid fu library but when ever i go to test the app it force closes.

I have used an example of the asynctask and when i test the app it loads and does what its meant to but when i replace it with the betterasynctask the app force closes.

You can download the source of the test app from http://androidapp.dino-digital.com/DroidFuTest.zip

Hopefully someone can help me with this.

Cheers Adam

A: 

This is caused by you not providing a valid resource pointer for your dialog. Right after you instantiate the task -- try calling the task.disableDialog(); method. It should work after that.

EDIT: Seeing as the user wants a custom dialog -- I'd point you to this link. Just create a new custom dialog(or just use the Android's helper methods for creating a dialog) and reference that ID from your code.

hwrdprkns
thanks that worked for that example but what would i do if i wanted the progressDialog while its doing an action like downloading an xml file in the background?
adamias
A: 

Even though hwrdprkns was correct as to disabling the dialog will make the app work to be able to get the progress dialog to work i add to the following to get the dialog to work.

Call both lines to set the dialog content

super.setProgressDialogTitleId(R.string.dialog_title); super.setProgressDialogMsgId(R.string.dialog_message);

OR

define "droidfu_progress_dialog_title" and "droidfu_progress_dialog_message" in your strings.xml

adamias