横向
在AndroidManifest.xml下
在Activity中添加 android:screenOrientation="landscape" 或者你想要的屏幕
全屏
andirod
导入
import android.view.Window;
import android.view.WindowManager;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
this.setFullScreen();
super.loadUrl("file:///android_asset/www/index.html");
}
//全屏(无标题栏和状态栏)
public void setFullScreen() {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);//清除FLAG
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
ios,iphone
//setStatusBarHidden:withAnimation:
// [[UIApplication sharedApplication] setStatusBarHidden:YES];
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];