Re: [android-developers] Showing Custom Dialog

2010-02-09 Thread venkat ranjit
Hi friend , i am sending code that displays alertDialog using AlertDialog class ok package no.freedommedia.featurebooster.cmd; import java.util.ArrayList; import java.util.concurrent.Semaphore; import android.app.Activity; import android.app.AlertDialog.Builder; import android.content.Cont

Re: [android-developers] Showing Custom Dialog

2010-02-08 Thread TreKing
DO NOT use getApplicationContext(), use *this*. On Sat, Feb 6, 2010 at 10:59 PM, YCH wrote: > Hi, > > I am new to android development and is having some problems on showing > a custom dialog. My development environment is sdk 1.5 with eclipse. > > In the menu, if user click on the first button,

[android-developers] Showing Custom Dialog

2010-02-08 Thread YCH
Hi, I encountered a message like below when opening a custom dialog through menu option. 02-07 16:37:45.478: ERROR/BACKGROUND_PROC(1007): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application Using the latest sdk with 1.5 emulator. Any ideas?

[android-developers] Showing Custom Dialog

2010-02-08 Thread YCH
Hi, I am new to android development and is having some problems on showing a custom dialog. My development environment is sdk 1.5 with eclipse. In the menu, if user click on the first button, I want to show a dialog. public boolean onOptionsItemSelected(MenuItem item) { switch (item.