Question

In my aplication only on 4.2 devices do that:

enter image description here

My activity manifest:

<activity
   android:name=".CatalogListActivity"
   android:label="@string/lbl_catalog"
   android:theme="@style/Theme.AppCompat" >
</activity>

My onCreate:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.cataloglist_activity);

    getSupportActionBar().setBackgroundDrawable(null);

    initControls();

    checkCatalogs();

}
Was it helpful?

Solution

I found the bug

the previous activity (which was a splash screen), the theme was set as fullscreen. For some reason, when I called the other activity by intent, the bug described happened.

What I did:

I changed the manifest to:

android:theme="@style/Theme.AppCompat"

and added in onCreate of the SplashScreen:

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);

Thanks!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top