标签:request log logs listen activity androi lan and java
private void init() { Button landButton = (Button) findViewById(R.id.landbutton); landButton.setOnClickListener(new ClickListenerlandButton()); Button VButton = (Button) findViewById(R.id.Vbutton); VButton.setOnClickListener(new ClickListenerVButton()); } private class ClickListenerlandButton implements OnClickListener { @Override public void onClick(View v) { landScreen(); } } private void landScreen() { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);//横屏 } private class ClickListenerVButton implements OnClickListener { @Override public void onClick(View v) { VScreen(); } } private void VScreen() { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);//竖屏 }
标签:request log logs listen activity androi lan and java
原文地址:http://www.cnblogs.com/gisoracle/p/7078374.html