Dialog prob?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Dialog prob?

Postby chaoz1336 » Mon Oct 12, 2009 2:30 pm

Hey guys,

I got a lil prob, its like the following:

I overwrited "public boolean onKey(View v, int keyCode, KeyEvent event)"
by implementing onKeyListener, to catch the back/return-button...

like:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public boolean onKey(View v, int keyCode, KeyEvent event)
  2. {
  3. if(keyCode == KeyEvent.KEYCODE_BACK)
  4. {
  5. //do sth when back is pressed
  6. //ACTION MARK
  7.  
  8. //if(ThereIsADialog)    //how can I do sth like that?
  9. //return false;
  10.  
  11. }
  12. }
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


BUT... now I spawn a dialog out of a jar (cant access the dlg!) and when I press back,
he comes to "action mark" (see comment)...
my prob: In this situation I dont know wether a dialog is in front or not... (using booleans only is useless, too many threads =/ )


so.. my question:
How can I find out wether a dialog is displayed?



thx a lot in advance!
chaoz1336
Experienced Developer
Experienced Developer
 
Posts: 90
Joined: Wed Dec 10, 2008 5:19 pm

Top

Postby Emmanuel7 » Mon Oct 12, 2009 9:23 pm

Isn't MyDialog.isShowing() doing the job ?

I'm not sure about this one, but I tried :)
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Postby chaoz1336 » Tue Oct 13, 2009 7:07 am

yeah maybe, but I dont have access to these dialogs ^^
they are spawned out of a jar =(
chaoz1336
Experienced Developer
Experienced Developer
 
Posts: 90
Joined: Wed Dec 10, 2008 5:19 pm

Postby chaoz1336 » Thu Oct 15, 2009 2:20 pm

..... +- u got any idea? ^^
chaoz1336
Experienced Developer
Experienced Developer
 
Posts: 90
Joined: Wed Dec 10, 2008 5:19 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests