4

In my app i make the app fullscreen. Means android title bar and notification bar is hidden here. But when i click on the spinner the hidden notification bar gets visible for fraction of seconds. It is not happening with all the spinners in my app. But where i use a array,generated by a loop execution in the spinner adapter, it is only happening in that case. I have come to know that it is a known bug in android. I also use the following style in spinner to resolve it.

In my app i make the app fullscreen. Means android title bar and notification bar is hidden here. But when i click on the spinner the hidden notification bar gets visible for fraction of seconds. It is not happening with all the spinners in my app. But where i use a array,generated by a loop execution in the spinner adapter, it is only happening in that case. I have come to know that it is a known bug in android. I also use the following style in spinner to resolve it.

true true @null

But still i cant solve this problem.. If anyone has any solution please let me know.

GeorgePotter
  • 889
  • 1
  • 10
  • 18
Debarati
  • 3,296
  • 2
  • 18
  • 30

2 Answers2

2

add this line before setContentView():

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Xazen
  • 822
  • 2
  • 12
  • 26
0

Then u use requestWindowFeature(Window.FEATURE_NO_TITLE); in activity and it must be before of the setContentView(....) method

Pinki
  • 21,723
  • 16
  • 55
  • 88
  • i have already used this code. I did as below.. this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN ); The style i have used is as below... – Debarati Jan 21 '11 at 07:10
  • requestWindowFeature(Window.FEATURE_NO_TITLE); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN ); setContentView(R.layout.search_page); – Debarati Jan 22 '11 at 05:10
  • Here is the adapter part......................... String[] str = new String[103]; int age = 18; for(int i = 0; i<103; i++){ str[i] = String.valueOf(age); age++; } adapter = new ArrayAdapter( this, R.layout.spinner_item, str); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); searchAgeToSpinner = (Spinner) findViewById(R.id.SearchAgeToSpinner); searchAgeToSpinner.setAdapter(adapter); – Debarati Jan 22 '11 at 05:12
  • The spinner part of the xml..... – Debarati Jan 22 '11 at 05:13
  • I have used the same spinner xml in another layout. But it is not happening there. The only difference out here is that here i am using a array using for loop.. If you can solve it please let me know. – Debarati Jan 22 '11 at 05:16