感谢Sean_帅恩分享,非常感谢

MIX2 适配看这一篇就够了,18:9 只需一行代码

升级你的app以支持高长宽比的新旗舰

Android手机 全面屏(18:9屏幕)适配指南

属性介绍 resizeableActivity

added in API level 24 int resizeableActivity Indicates that it is okay
for this activity to be resized to any dimension. Intended for a
multi-window device where there can be multiple activities of various
sizes on the screen at the same time.

The default value is false for applications with targetSdkVersion
lesser than N and true otherwise.

NOTE: A task’s root activity value is applied to all additional
activities launched in the task. That is if the root activity of a
task is resizeable then the system will treat all other activities in
the task as resizeable and will not if the root activity isn’t
resizeable.

NOTE: The value of screenOrientation is ignored for resizeable
activities when in multi-window mode.

May be a boolean value, such as “true” or “false”.

翻译
resizeableActivity

在API级别24中添加 int resizeableActivity
表明该活动对任何维度进行调整是可以的。适用于多窗口设备,可以同时在屏幕上显示各种大小的多个活动。
对于具有targetSdkVersion小于N的应用程序来说,默认值是false,反之则不然。
注意:任务的根活动值应用于任务中所有的附加活动。也就是说,如果任务的根活动是可调整的,那么系统将把任务中的所有其他活动视为可调整的,并且如果根活动不可调整,则不会。
注意:当在多窗口模式下,屏幕定位的值被忽略了。 可能是一个布尔值,例如“true”或“false”。

更多相关文章

  1. Android 代码实现查看SQLite数据库中的表
  2. android:如何在java代码中覆盖webview中的javascript事件
  3. android的代码性能优化
  4. 《第一行代码》扩展总结
  5. Android Studio 初步在代码中操作控件
  6. 【代码】Android: 怎样设置app不被系统k掉

随机推荐

  1. android中的ANR
  2. 简单学习Android TextView
  3. android软键盘的隐藏以及Edittext的焦点
  4. 状态开关按钮ToggleButton和开关switch的
  5. LeadTools Android 入门教学——运行第一
  6. Android自定义View(自定义控件)
  7. Android 线程池框架、Executor、ThreadPo
  8. Android 动画入门指南
  9. Material Design 方案之 (详细)
  10. android 开发的必备工具