Homescreen is moving up and down once when entering to that page in my android app

104 views Asked by At

After adding

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:hardwareAccelerated="false" 

in application of manifest.xml only home screen is moving up and down.Before It was working fine.But I need my app in full screen mode without title. I didn't get any solution till now. Thank you in advance

2

There are 2 answers

1
Vipin Sahu On

Please Define style for all version Platform in resource or Create a base activity

and use this code to hide the tittle

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

And also please ensure that android:hardwareAccelerated="true" for better performance

I am using these ,,, in all my application ... never such thing happens on any deice

<uses-sdk 
    android:minSdkVersion="9"
    android:targetSdkVersion="14" />

  <activity
        android:name="com.example.app.SplashActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
0
Virag Brahme On
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class ActivityName extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // remove title
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.main);
    }
}

You can try it programmatically...