欢迎来到天天文库
浏览记录
ID:12160110
大小:338.50 KB
页数:0页
时间:2018-07-15
《android之手机屏幕朝向》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、2013Android手机屏幕朝向开发宝典Android之手机屏幕朝向模拟当点击按钮时,使手机朝向发生改变。main.xml布局文件2、tools:context=".MainActivity">3、ng/title"android:textSize="20sp"/>4、ing/btntext"/>5、ayout>Strings.xml布局文件52013Android手机屏幕朝向开发宝典ScreenForward手机屏幕朝向测试点击更换屏幕朝向显示当前屏幕朝向6、ources>MainActivity类packagecom.example.screenforward;importandroid.os.Bundle;importandroid.app.Activity;importandroid.content.pm.ActivityInfo;importandroid.content.res.Configuration;importandroid.view.Menu;importandroid.view.View;importandroid.view.View.On7、ClickListener;importandroid.widget.Button;importandroid.widget.EditText;importandroid.widget.Toast;publicclassMainActivityextendsActivity{privateEditTexteditText;privateButtonbutton;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(sa8、vedInstanceState);setContentView(R.layout.activity_main);editText=(EditText)findViewById(R.id.edit);button=(Button)findViewById(R.id.btnchange);button.setOnClickListener(newOnClickListener(){publicvoidonClick
2、tools:context=".MainActivity">3、ng/title"android:textSize="20sp"/>4、ing/btntext"/>5、ayout>Strings.xml布局文件52013Android手机屏幕朝向开发宝典ScreenForward手机屏幕朝向测试点击更换屏幕朝向显示当前屏幕朝向6、ources>MainActivity类packagecom.example.screenforward;importandroid.os.Bundle;importandroid.app.Activity;importandroid.content.pm.ActivityInfo;importandroid.content.res.Configuration;importandroid.view.Menu;importandroid.view.View;importandroid.view.View.On7、ClickListener;importandroid.widget.Button;importandroid.widget.EditText;importandroid.widget.Toast;publicclassMainActivityextendsActivity{privateEditTexteditText;privateButtonbutton;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(sa8、vedInstanceState);setContentView(R.layout.activity_main);editText=(EditText)findViewById(R.id.edit);button=(Button)findViewById(R.id.btnchange);button.setOnClickListener(newOnClickListener(){publicvoidonClick
3、ng/title"android:textSize="20sp"/>4、ing/btntext"/>5、ayout>Strings.xml布局文件52013Android手机屏幕朝向开发宝典ScreenForward手机屏幕朝向测试点击更换屏幕朝向显示当前屏幕朝向6、ources>MainActivity类packagecom.example.screenforward;importandroid.os.Bundle;importandroid.app.Activity;importandroid.content.pm.ActivityInfo;importandroid.content.res.Configuration;importandroid.view.Menu;importandroid.view.View;importandroid.view.View.On7、ClickListener;importandroid.widget.Button;importandroid.widget.EditText;importandroid.widget.Toast;publicclassMainActivityextendsActivity{privateEditTexteditText;privateButtonbutton;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(sa8、vedInstanceState);setContentView(R.layout.activity_main);editText=(EditText)findViewById(R.id.edit);button=(Button)findViewById(R.id.btnchange);button.setOnClickListener(newOnClickListener(){publicvoidonClick
4、ing/btntext"/>
5、ayout>Strings.xml布局文件52013Android手机屏幕朝向开发宝典ScreenForward手机屏幕朝向测试点击更换屏幕朝向显示当前屏幕朝向6、ources>MainActivity类packagecom.example.screenforward;importandroid.os.Bundle;importandroid.app.Activity;importandroid.content.pm.ActivityInfo;importandroid.content.res.Configuration;importandroid.view.Menu;importandroid.view.View;importandroid.view.View.On7、ClickListener;importandroid.widget.Button;importandroid.widget.EditText;importandroid.widget.Toast;publicclassMainActivityextendsActivity{privateEditTexteditText;privateButtonbutton;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(sa8、vedInstanceState);setContentView(R.layout.activity_main);editText=(EditText)findViewById(R.id.edit);button=(Button)findViewById(R.id.btnchange);button.setOnClickListener(newOnClickListener(){publicvoidonClick
6、ources>MainActivity类packagecom.example.screenforward;importandroid.os.Bundle;importandroid.app.Activity;importandroid.content.pm.ActivityInfo;importandroid.content.res.Configuration;importandroid.view.Menu;importandroid.view.View;importandroid.view.View.On
7、ClickListener;importandroid.widget.Button;importandroid.widget.EditText;importandroid.widget.Toast;publicclassMainActivityextendsActivity{privateEditTexteditText;privateButtonbutton;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(sa
8、vedInstanceState);setContentView(R.layout.activity_main);editText=(EditText)findViewById(R.id.edit);button=(Button)findViewById(R.id.btnchange);button.setOnClickListener(newOnClickListener(){publicvoidonClick
此文档下载收益归作者所有