Discussion:
Jumping effect of Status Bar
Kichch
2010-02-04 15:49:38 UTC
Permalink
Hi everybody

I have a problem with my app. I use the full screen option like so:
public void setFullscreen() {
requestWindowFeature(Window.FEATURE_NO_TITLE);

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}

But, later during the game, when I show the AlertDialog for Help /
Info, the status bar comes back for a fraction of a second and
disappears again creating a flashing or jumping effect. Also, the
Dialog itself is not centered as it should, almost as if it thought
there was a status bar.

Here is how I display the dialog:

protected Dialog onCreateDialog(int id) {
TextView tv;

switch (id) {
case MENU_HELP:
tv = new TextView(this);
tv.setText(R.strings.help_msg);

return new AlertDialog.Builder(BlackJackView.this)
.setIcon(android.R.drawable.ic_menu_help)
.setTitle("How-To")
.setView(tv)
.setPositiveButton("OK", new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {

/* User clicked OK so do some stuff */

}
})
.create();
}

………

}
return null;
}

Does anyone know what may be causing this appearing / disappearing?
How do I make it stop this jumping behavior?

Thanks for all your help.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Kichch
2010-02-04 15:56:15 UTC
Permalink
Hi everybody

I have a problem with my app. I use the full screen option like so:
public void setFullscreen() {
requestWindowFeature(Window.FEATURE_NO_TITLE);

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}

But, later during the game, when I show the AlertDialog for Help /
Info, the status bar comes back for a fraction of a second and
disappears again creating a flashing or jumping effect. Also, the
Dialog itself is not centered as it should, almost as if it thought
there was a status bar.

Here is how I display the dialog:

protected Dialog onCreateDialog(int id) {
TextView tv;

switch (id) {
case MENU_HELP:
tv = new TextView(this);
tv.setText(R.strings.help_msg);

return new AlertDialog.Builder(BlackJackView.this)
.setIcon(android.R.drawable.ic_menu_help)
.setTitle("How-To")
.setView(tv)
.setPositiveButton("OK", new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton) {
/* User clicked OK so do some stuff */
}
})
.create();
}

………

}
return null;
}

Does anyone know what may be causing this appearing / disappearing?
How do I make it stop this jumping behavior?

Thanks for all your help.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Loading...