Frage

I followed this link to create camera overlay with an image. But my problem is I can't remove the title bar using the following codes in onCreate() method:

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

It causes probably for the below's code in onCreate method:

getWindow().setFormat(PixelFormat.UNKNOWN);

Now, what can I do and why this is happening? Can anybody explain??

War es hilfreich?

Lösung

Use this under the activity tag in manifest file.

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

Andere Tipps

Use following property in your manifest file for the camera activity

<activity android:name="youractivityname"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"/>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top