程序中隐藏状态栏
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);?
? ? }?
}?
<activity android:name=".ActivityName"?
? ? android:label="@string/app_name"?
? ? android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">?
</activity>?