Android(安卓)Studio 预览-全屏
16lz
2021-01-26
Android Studio 预览界面默认上下有状态栏和导航栏,
如果需要得到全屏模式的预览可以进行如下操作:
打开AVD Manager 如图所示创建一个新Hardware Profile
style.xml中新建一个style
新建一个空Activity, AndroidManifest.xml中android:theme
<activity android:name=".activity.FullScreenActivity" android:theme="@style/AppCompatFullscreen" />
在需要全屏预览layout.xml根布局中加入 tools:context=”.activity.FullScreenActivity”
<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".activity.FullScreenActivity">
右侧预览界面选中新建的Hardware 和 Theme
选择之后Hardware 会记住, Theme是根据
tools:context=”.activity.FullScreenActivity”
FullScreenActivity的Theme自动选择的
全屏预览效果
更多相关文章
- IOS之UIViewController
- android DecorView
- [Android]开源中国源码分析——Activity
- Android:Chip、ChipGroups、ChipDrawable
- Unity 实现Android不锁屏
- 类似home的弹出菜单(SlidingDrawer)
- Android第一个应用程序helloworld项目详解
- android 入门 001 (界面布局)
- android CheckBox RadioButton 照片和文字的间距问题