1.全屏,在manifest中activity中设置 ,无标题栏和状态栏
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
在java代码中设置
this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏,必须写在setContentView前面,manifest中也有同样方法
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏
2.横竖屏 ,在manifest中activity里设置
android:screenOrientation=”portrait” 限制竖屏
screenOrientation横竖屏,不设置自动旋转,landscape限制横屏
3.活动之间的跳转
显式Intent,隐式Intent,带返回值的跳转,注意查api
其中,隐式启动Activity,在manifest中加intent-filter,name要对应,category必须写DEFAULT。
4.给APP加权限,写在
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.SEND_SMS" />
5.Android四大组件Activity,service,ContentProvider,BroadcastReceiver(五大?intent)
6.Intent系统之间进行通信的工具(包裹)六大属性:
A、component
B、action启动某一特定的应用,有固定常量(打电话,发短信等应用)
C、data不常用,例如开发打电话应用
D、category
E、type
F、extras,Intent可以使用两种数据,data,extras