Question

J'ai trouvé tas d'échantillons comment supprimer la barre de titre / notification sur Android. Cependant, il est toujours pas en plein écran.

Je vois encore un panneau sur ma table avec la recherche, la maison, le dos et un autre bouton.

Avez-vous des idées sur la façon de cacher ce panneau?

D'une manière générale, je veux genre de mode kiosque.

Était-ce utile?

La solution 3

The core problem was device specific. I was doing development for Archos and Archos has it's own bar, which isn't not removed by FLAG_FULLSCREEN and FEATURE_NO_TITLE

Autres conseils

Use this code in onCreate of activity:

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

Sample code for a fullscreen activity:

public class HellofullActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.main);
    }
}

where you request that the window has not the green title bar and take full screen.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top