Android 16에는 개발자를 위한 훌륭한 새로운 기능과 API가 도입되었습니다. 다음 섹션에서는 관련 API를 시작하는 데 도움이 되도록 이러한 기능을 요약합니다.
새로운 API, 수정된 API, 삭제된 API에 관한 자세한 목록은 API 차이점 보고서를 참고하세요. 새로운 API에 관한 자세한 내용은 Android API 참조를 방문하세요. 새로운 API가 강조 표시되어 쉽게 확인 가능합니다.플랫폼 변경사항이 앱에 영향을 미칠 수 있는 영역도 검토해야 합니다. 자세한 내용은 다음 페이지를 참고하세요.
핵심 기능
Android에는 Android 시스템의 핵심 기능을 확장하는 새로운 API가 포함되어 있습니다.
2025년 두 가지 Android API 출시
- This preview is for the next major release of Android with a planned launch in Q2 of 2025. This release is similar to all of our API releases in the past, where we can have planned behavior changes that are often tied to a targetSdkVersion.
- We're planning the major release a quarter earlier (Q2 rather than Q3 in prior years) to better align with the schedule of device launches across our ecosystem, so more devices can get the major release of Android sooner. With the major release coming in Q2, you'll need to do your annual compatibility testing a few months earlier than in previous years to make sure your apps are ready.
- We plan to have another release in Q4 of 2025 which also will include new developer APIs. The Q2 major release will be the only release in 2025 to include planned behavior changes that could affect apps.
In addition to new developer APIs, the Q4 minor release will pick up feature updates, optimizations, and bug fixes; it will not include any app-impacting behavior changes.

We'll continue to have quarterly Android releases. The Q1 and Q3 updates in-between the API releases will provide incremental updates to help ensure continuous quality. We're actively working with our device partners to bring the Q2 release to as many devices as possible.
Using new APIs with major and minor releases
Guarding a code block with a check for API level is done today using
the SDK_INT
constant with
VERSION_CODES
. This will continue
to be supported for major Android releases.
if (SDK_INT >= VERSION_CODES.BAKLAVA) {
// Use APIs introduced in Android 16
}
The new SDK_INT_FULL
constant can be used for API checks against both major and minor versions with
the new VERSION_CODES_FULL
enumeration.
if (SDK_INT_FULL >= VERSION_CODES_FULL.[MAJOR or MINOR RELEASE]) {
// Use APIs introduced in a major or minor release
}
You can also use the
Build.getMinorSdkVersion()
method to get just the minor SDK version.
val minorSdkVersion = Build.getMinorSdkVersion(VERSION_CODES_FULL.BAKLAVA)
These APIs have not yet been finalized and are subject to change, so please send us feedback if you have any concerns.
사용자 환경 및 시스템 UI
Android 16에서는 앱 개발자와 사용자가 필요에 맞게 기기를 구성할 수 있는 더 많은 제어 기능과 유연성을 제공합니다.
진행 상황 중심 알림
Android 16 introduces progress-centric notifications to help users seamlessly track user-initiated, start-to-end journeys.
Notification.ProgressStyle
is a new notification
style that lets you create progress-centric notifications. Key use cases include
rideshare, delivery, and navigation. Within the Notification.ProgressStyle
class, you can denote states and milestones in a user journey using
points and segments.
To learn more, see the Progress-centric notifications documentation page.


뒤로 탐색 예측 업데이트
Android 16 添加了新 API,可帮助您在手势导航中启用预测性返回系统动画,例如“返回主屏幕”动画。通过使用新的 PRIORITY_SYSTEM_NAVIGATION_OBSERVER
注册 onBackInvokedCallback
,您的应用可以在系统处理返回导航时接收常规的 onBackInvoked
调用,而不会影响正常的返回导航流程。
Android 16 还添加了 finishAndRemoveTaskCallback()
和 moveTaskToBackCallback
。通过向 OnBackInvokedDispatcher
注册这些回调,系统可以在调用返回手势时触发特定行为并播放相应的提前动画。
더 풍부한 햅틱
自诞生之日起,Android 就提供了对触感反馈致动器的控制。
Android 11 添加了对更复杂的触感反馈效果的支持,更高级的致动器可以通过设备定义的语义基元 VibrationEffect.Compositions
支持这些效果。
Android 16 添加了触感反馈 API,让应用能够定义触感反馈效果的振幅和频率曲线,同时抽象出设备功能之间的差异。
개발자 생산성 및 도구
생산성 향상을 위한 대부분의 작업은 Android 스튜디오, Jetpack Compose, Android Jetpack 라이브러리와 같은 도구를 중심으로 이루어지지만, Google에서는 항상 플랫폼에서 개발자의 비전을 실현할 수 있는 방법을 모색합니다.
라이브 배경화면 콘텐츠 처리
In Android 16, the live wallpaper framework is gaining a new content API to
address the challenges of dynamic, user-driven wallpapers. Currently, live
wallpapers incorporating user-provided content require complex, service-specific
implementations. Android 16 introduces
WallpaperDescription
and
WallpaperInstance
. WallpaperDescription lets you
identify distinct instances of a live wallpaper from the same service. For
example, a wallpaper that has instances on both the home screen and on the lock
screen may have unique content in both places. The wallpaper picker and
WallpaperManager
use this metadata to better present
wallpapers to users, streamlining the process for you to create diverse and
personalized live wallpaper experiences.
성능 및 배터리
Android 16에서는 앱에 관한 유용한 정보를 수집하는 데 도움이 되는 API를 도입합니다.
시스템 트리거 프로파일링
ProfilingManager
在 Android 15 中添加,让应用能够在现场使用 Perfetto 请求收集性能数据。不过,由于此性能分析必须从应用启动,因此应用很难或根本无法捕获启动或 ANR 等关键流程。
为此,Android 16 向 ProfilingManager
引入了系统触发的性能分析。应用可以注册接收特定触发器(例如冷启动 reportFullyDrawn
或 ANR)轨迹的兴趣,然后系统会代表应用启动和停止轨迹。轨迹完成后,结果会传送到应用的数据目录。
ApplicationStartInfo에서 구성요소 시작
ApplicationStartInfo
在 Android 15 中添加,可让应用查看进程启动原因、启动类型、启动时间、节流和其他实用诊断数据。Android 16 添加了 getStartComponent()
,用于区分触发启动的组件类型,这有助于优化应用的启动流程。
작업 인트로스펙션 개선
The JobScheduler#getPendingJobReason()
API returns a reason why a job
might be pending. However, a job might be pending for multiple reasons.
In Android 16, we are introducing a new API
JobScheduler#getPendingJobReasons(int jobId)
, which returns multiple
reasons why a job is pending, due to both explicit constraints set by the
developer and implicit constraints set by the system.
We're also introducing
JobScheduler#getPendingJobReasonsHistory(int jobId)
, which returns a list
of the most recent constraint changes.
We recommend using the API to help you debug why your jobs may not be executing, especially if you're seeing reduced success rates of certain tasks or have bugs around latency of certain job completion. For example, updating widgets in the background failed to occur or prefetch job failed to be called prior to app start.
This can also better help you understand if certain jobs are not completing due to system defined constraints versus explicitly set constraints.
자동 조절 새로고침 빈도
Android 15 中引入的自适应刷新率 (ARR) 可让受支持硬件上的显示屏刷新率使用离散的 VSync 步长来适应内容帧速率。这不仅降低了功耗,还无需进行可能导致卡顿的模式切换。
Android 16 引入了 hasArrSupport()
和 getSuggestedFrameRate(int)
,同时恢复了 getSupportedRefreshRates()
,以便您的应用更轻松地利用 ARR。RecyclerView 1.4 在从快速滑动或平滑滚动中稳定下来时会在内部支持 ARR,我们将继续努力,将 ARR 支持添加到更多 Jetpack 库中。这篇帧速率文章介绍了许多可用于设置帧速率的 API,以便您的应用可以直接使用 ARR。
ADPF의 여유 공간 API
The SystemHealthManager
introduces the
getCpuHeadroom
and
getGpuHeadroom
APIs, designed to provide games and
resource-intensive apps with estimates of available CPU and GPU resources. These
methods offer a way for you to gauge how your app or game can best improve
system health, particularly when used in conjunction with other Android Dynamic
Performance Framework (ADPF) APIs that detect thermal
throttling.
By using CpuHeadroomParams
and
GpuHeadroomParams
on supported devices, you can
customize the time window used to compute the headroom and select between
average or minimum resource availability. This can help you reduce your CPU or
GPU resource usage accordingly, leading to better user experiences and improved
battery life.
접근성
Android 16에는 앱을 모든 사용자에게 제공하는 데 도움이 되는 새로운 접근성 API와 기능이 추가되었습니다.
접근성 API 개선
Android 16 添加了其他 API 来增强界面语义,这有助于为依赖于无障碍服务(例如 TalkBack)的用户提高一致性。
为文字添加轮廓,以最大限度地提高文字对比度
视力较低的用户对对比度的敏感度通常较低,因此很难将对象与背景区分开来。为了帮助这些用户,Android 16 引入了轮廓文本,取代了高对比度文本,后者会在文本周围绘制较大的对比度区域,以大大提高可辨性。
Android 16 包含新的 AccessibilityManager
API,可让您的应用检查或注册监听器,以查看此模式是否已启用。这主要适用于 Compose 等界面工具包,以提供类似的视觉体验。如果您维护界面工具包库,或者您的应用执行绕过 android.text.Layout
类的自定义文本渲染,则可以使用此方法来了解何时启用轮廓文本。

向 TtsSpan 添加了时长
Android 16 使用 TYPE_DURATION
扩展了 TtsSpan
,其中包含 ARG_HOURS
、ARG_MINUTES
和 ARG_SECONDS
。这样,您就可以直接为时长添加注释,确保通过 TalkBack 等服务获得准确且一致的文本转语音输出。
支持具有多个标签的元素
Android 目前允许界面元素从其他元素派生其无障碍功能标签,现在还支持关联多个标签,这是 Web 内容中常见的情况。通过在 AccessibilityNodeInfo
中引入基于列表的 API,Android 可以直接支持这些多标签关系。在进行这项更改的过程中,我们已弃用 AccessibilityNodeInfo#setLabeledBy
和 #getLabeledBy
,改用 #addLabeledBy
、#removeLabeledBy
和 #getLabeledByList
。
改进了对可展开元素的支持
Android 16 添加了无障碍功能 API,可让您传达互动元素(例如菜单和展开式列表)的展开或收起状态。通过使用 setExpandedState
设置展开状态,并使用 CONTENT_CHANGE_TYPE_EXPANDED
内容更改类型调度 TYPE_WINDOW_CONTENT_CHANGED AccessibilityEvents,您可以确保 TalkBack 等屏幕阅读器会读出状态更改,从而提供更直观、更包容的用户体验。
不确定进度条
Android 16 添加了 RANGE_TYPE_INDETERMINATE
,让您可以为确定性和不确定性 ProgressBar
微件公开 RangeInfo
,从而让 TalkBack 等服务能够更一致地为进度指示器提供反馈。
三态复选框
Android 16 中的新 AccessibilityNodeInfo
getChecked
和 setChecked(int)
方法现在除了“已选中”和“未选中”之外,还支持“部分选中”状态。此字段取代了已废弃的布尔值 isChecked
和 setChecked(boolean)
。
补充说明
如果无障碍服务提供关于 ViewGroup
的说明,则会将来自其子视图的内容标签合并在一起。如果您为 ViewGroup
提供 contentDescription
,无障碍服务会假定您还要覆盖不可聚焦的子视图的说明。如果您想为下拉菜单等内容添加标签(例如“字体系列”),同时保留当前的无障碍功能选择(例如“Roboto”),这可能会造成问题。Android 16 添加了 setSupplementalDescription
,以便您提供用于提供 ViewGroup
相关信息的文本,而不会覆盖其子项中的信息。
必填表单字段
Android 16 向 AccessibilityNodeInfo
添加了 setFieldRequired
,以便应用可以告知无障碍服务需要输入表单字段。对于填写各种类型表单的用户而言,这是一个重要的场景,即使是简单的必填条款及条件复选框,也能帮助用户始终如一地识别必填字段并在必填字段之间快速导航。
LEA 보청기를 사용한 음성 통화 시 휴대전화를 마이크 입력으로 사용
Android 16 新增了一项功能,让 LE Audio 助听器用户能够在助听器的内置麦克风和手机上的麦克风之间切换,以进行语音通话。在嘈杂的环境或助听器麦克风可能无法正常工作的其他情况下,这会很有帮助。
LEA 보청기의 주변 볼륨 제어
Android 16 新增了一项功能,可让 LE Audio 助听器用户调节助听器麦克风接收的环境声音的音量。在背景噪音过大或过小的情况下,这可能会很有用。
카메라
Android 16에서는 전문 카메라 사용자를 위한 지원이 강화되어 정확한 색온도 및 색조 조정과 함께 하이브리드 자동 노출이 가능합니다. 새 야간 모드 표시기를 사용하면 앱이 야간 모드 카메라 세션으로 전환해야 하는 시점을 알 수 있습니다. 새로운 Intent
작업을 통해 모션 포토를 더 쉽게 촬영할 수 있으며, HEIC 인코딩 지원 및 ISO 21496-1 초안 표준의 새로운 파라미터를 통해 UltraHDR 이미지를 계속 개선하고 있습니다.
하이브리드 자동 노출
Android 16 adds new hybrid auto-exposure modes to Camera2, allowing you to manually control specific aspects of exposure while letting the auto-exposure (AE) algorithm handle the rest. You can control ISO + AE, and exposure time + AE, providing greater flexibility compared to the current approach where you either have full manual control or rely entirely on auto-exposure.
fun setISOPriority() {
// ... (Your existing code before the snippet) ...
val availablePriorityModes = mStaticInfo.characteristics.get(
CameraCharacteristics.CONTROL_AE_AVAILABLE_PRIORITY_MODES
)
// ... (Your existing code between the snippets) ...
// Turn on AE mode to set priority mode
reqBuilder.set(
CaptureRequest.CONTROL_AE_MODE,
CameraMetadata.CONTROL_AE_MODE_ON
)
reqBuilder.set(
CaptureRequest.CONTROL_AE_PRIORITY_MODE,
CameraMetadata.CONTROL_AE_PRIORITY_MODE_SENSOR_SENSITIVITY_PRIORITY
)
reqBuilder.set(
CaptureRequest.SENSOR_SENSITIVITY,
TEST_SENSITIVITY_VALUE
)
val request: CaptureRequest = reqBuilder.build()
// ... (Your existing code after the snippet) ...
}
정확한 색상 온도 및 색조 조정
Android 16 adds camera support for fine color temperature and tint adjustments
to better support professional video recording applications. In previous Android
versions, you could control white balance settings through
CONTROL_AWB_MODE
, which contains options limited to a
preset list, such as Incandescent,
Cloudy, and Twilight. The
COLOR_CORRECTION_MODE_CCT
enables the use of
COLOR_CORRECTION_COLOR_TEMPERATURE
and
COLOR_CORRECTION_COLOR_TINT
for precise adjustments of
white balance based on the correlated color temperature.
fun setCCT() {
// ... (Your existing code before this point) ...
val colorTemperatureRange: Range<Int> =
mStaticInfo.characteristics[CameraCharacteristics.COLOR_CORRECTION_COLOR_TEMPERATURE_RANGE]
// Set to manual mode to enable CCT mode
reqBuilder[CaptureRequest.CONTROL_AWB_MODE] = CameraMetadata.CONTROL_AWB_MODE_OFF
reqBuilder[CaptureRequest.COLOR_CORRECTION_MODE] = CameraMetadata.COLOR_CORRECTION_MODE_CCT
reqBuilder[CaptureRequest.COLOR_CORRECTION_COLOR_TEMPERATURE] = 5000
reqBuilder[CaptureRequest.COLOR_CORRECTION_COLOR_TINT] = 30
val request: CaptureRequest = reqBuilder.build()
// ... (Your existing code after this point) ...
}
The following examples show how a photo would look after applying different color temperature and tint adjustments:





카메라 야간 모드 장면 감지
To help your app know when to switch to and from a night mode camera session,
Android 16 adds EXTENSION_NIGHT_MODE_INDICATOR
. If
supported, it's available in the CaptureResult
within
Camera2.
This is the API we briefly mentioned as coming soon in the How Instagram enabled users to take stunning low light photos blog post. That post is a practical guide on how to implement night mode together with a case study that links higher-quality in-app night mode photos with an increase in the number of photos shared from the in-app camera.
모션 사진 캡처 인텐트 작업
Android 16에는 카메라 애플리케이션이 모션 사진을 캡처하고 반환하도록 요청하는 표준 인텐트 작업인 ACTION_MOTION_PHOTO_CAPTURE
및 ACTION_MOTION_PHOTO_CAPTURE_SECURE
가 추가되었습니다.
이미지가 쓰여질 위치를 제어하기 위해 추가 EXTRA_OUTPUT
를 전달하거나 Intent.setClipData(ClipData)
을 통해 Uri
를 전달해야 합니다. ClipData
를 설정하지 않으면 Context.startActivity(Intent)
를 호출할 때 자동으로 복사됩니다.
UltraHDR 이미지 개선사항

Android 16 继续致力于通过 UltraHDR 图片提供出色的图片质量。它添加了对 HEIC 文件格式的 UltraHDR 图片的支持。这些图片将获得 ImageFormat
类型 HEIC_ULTRAHDR
,并包含类似于现有 UltraHDR JPEG 格式的嵌入式增益图。我们还在努力为 UltraHDR 添加 AVIF 支持,敬请期待。
此外,Android 16 在 UltraHDR 中实现了 ISO 21496-1 草稿标准中的其他参数,包括能够获取和设置应应用增益图算法的色彩空间,以及支持使用 SDR 增益图的 HDR 编码基础图片。
그래픽
Android 16에는 AGSL을 사용한 맞춤 그래픽 효과와 같은 최신 그래픽 개선사항이 포함되어 있습니다.
AGSL을 사용한 맞춤 그래픽 효과
Android 16 添加了 RuntimeColorFilter
和 RuntimeXfermode
,让您可以创作阈值、Sepia 和 Hue Saturation 等复杂效果,并将其应用于绘制调用。从 Android 13 开始,您可以使用 AGSL 创建扩展 Shader
的自定义 RuntimeShader。新 API 反映了这一点,添加了由 AGSL 驱动的 RuntimeColorFilter
(用于扩展 ColorFilter
)和 Xfermode
效果,让您可以在源像素和目标像素之间实现基于 AGSL 的自定义合成和混合。
private val thresholdEffectString = """
uniform half threshold;
half4 main(half4 c) {
half luminosity = dot(c.rgb, half3(0.2126, 0.7152, 0.0722));
half bw = step(threshold, luminosity);
return bw.xxx1 * c.a;
}"""
fun setCustomColorFilter(paint: Paint) {
val filter = RuntimeColorFilter(thresholdEffectString)
filter.setFloatUniform(0.5);
paint.colorFilter = filter
}
연결
Android 16은 앱이 통신 및 무선 기술의 최신 발전에 액세스할 수 있도록 플랫폼을 업데이트합니다.
강화된 보안으로 범위 지정
Android 16 在搭载 Wi-Fi 6 的 802.11az 的受支持设备上为 Wi-Fi 位置信息添加了对强大的安全功能的支持,让应用能够将该协议的更高精确性、更高可伸缩性和动态调度与安全增强功能(包括基于 AES-256 的加密和防范中间人攻击)相结合。这样,在近距离使用情形(例如解锁笔记本电脑或车门)时,便可更安全地使用该功能。802.11az 与 Wi-Fi 6 标准集成,可利用其基础架构和功能实现更广泛的采用和更轻松的部署。
일반 범위 지정 API
Android 16에는 로컬 기기와 원격 기기 간의 지원되는 하드웨어에서 거리와 각도를 결정하는 방법을 제공하는 새로운 RangingManager
가 포함되어 있습니다. RangingManager
는 BLE 채널 소리 재생, BLE RSSI 기반 측정, 초광대역, Wi-Fi 왕복 시간과 같은 다양한 측정 기술의 사용을 지원합니다.
호환 기기 관리자 기기 감지
Android 16 中引入了用于绑定配套应用服务的新 API。当 BLE 在范围内且蓝牙处于连接状态时,系统会绑定服务;当 BLE 不在范围内或蓝牙处于断开连接状态时,系统会解除绑定服务。应用将根据各种 DevicePresenceEvent
收到新的 'onDevicePresenceEvent()' 回调。如需了解详情,请参阅 'startObservingDevicePresence(ObservingDevicePresenceRequest)'。
미디어
Android 16에는 미디어 환경을 개선하는 다양한 기능이 포함되어 있습니다.
사진 선택 도구 개선사항
照片选择器为用户提供了一种安全的内置授权方式,让用户可以向应用授予对本地存储空间和云端存储空间中所选图片和视频的访问权限,而不是对整个媒体库的访问权限。通过 Google 系统更新和 Google Play 服务组合使用模块化系统组件,该工具向后支持到 Android 4.4(API 级别 19)。只需几行代码即可与相关的 Android Jetpack 库集成。
Android 16 对照片选择器进行了以下改进:
- 嵌入式照片选择器:新 API,可让应用将照片选择器嵌入其视图层次结构中。这样,它就感觉像是应用中更为集成的一部分,同时仍可利用进程隔离功能,让用户能够选择媒体,而无需应用拥有过于宽泛的权限。为了最大限度地提高跨平台版本的兼容性并简化集成,如果您想集成嵌入式照片选择器,则需要使用即将推出的 Android Jetpack 库。
- 照片选择器中的云搜索:新的 API 可让 Android 照片选择器从云端媒体提供商中进行搜索。照片选择器中的搜索功能即将推出。
Advanced Professional Video
Android 16 introduces support for the Advanced Professional Video (APV) codec which is designed to be used for professional level high quality video recording and post production.
The APV codec standard has the following features:
- Perceptually lossless video quality (close to raw video quality)
- Low complexity and high throughput intra-frame-only coding (without pixel domain prediction) to better support editing workflows
- Support for high bit-rate range up to a few Gbps for 2K, 4K and 8K resolution content, enabled by a lightweight entropy coding scheme
- Frame tiling for immersive content and for enabling parallel encoding and decoding
- Support for various chroma sampling formats and bit-depths
- Support for multiple decoding and re-encoding without severe visual quality degradation
- Support multi-view video and auxiliary video like depth, alpha, and preview
- Support for HDR10/10+ and user-defined metadata
A reference implementation of APV is provided through the OpenAPV project. Android 16 will implement support for the APV 422-10 Profile that provides YUV 422 color sampling along with 10-bit encoding and for target bitrates of up to 2Gbps.
개인정보처리방침
Android 16에는 앱 개발자가 사용자 개인 정보를 보호하는 데 도움이 되는 다양한 기능이 포함되어 있습니다.
헬스 커넥트 업데이트
Health Connect adds ACTIVITY_INTENSITY
, a data type defined according to World
Health Organization guidelines around moderate and vigorous activity. Each
record requires the start time, the end time, and whether the activity intensity
is moderate or vigorous.
Health Connect also contains updated APIs supporting medical records. This allows apps to read and write medical records in FHIR format with explicit user consent.
Android의 개인 정보 보호 샌드박스
Android 16 incorporates the latest version of the Privacy Sandbox on Android, part of our ongoing work to develop technologies where users know their privacy is protected. Our website has more about the Privacy Sandbox on Android developer beta program to help you get started. Check out the SDK Runtime which allows SDKs to run in a dedicated runtime environment separate from the app they are serving, providing stronger safeguards around user data collection and sharing.
보안
Android 16에는 앱의 보안을 강화하고 앱의 데이터를 보호하는 데 도움이 되는 기능이 포함되어 있습니다.
키 공유 API
Android 16 添加了一些 API,这些 API 支持与其他应用共享对 Android Keystore 密钥的访问权限。新的 KeyStoreManager
类支持按应用 uid 授予和撤消对密钥的访问权限,并包含一个供应用访问共享密钥的 API。
기기 폼 팩터
Android 16은 앱이 Android의 폼 팩터를 최대한 활용할 수 있도록 지원합니다.
TV용 표준화된 사진 및 오디오 품질 프레임워크
Android 16 中的新 MediaQuality
软件包公开了一组标准化 API,用于访问音频和图片配置文件以及与硬件相关的设置。这样,在线播放应用就可以查询配置文件并将其动态应用于媒体:
- 使用更大动态范围进行母版制作的电影需要更高的色彩准确度,才能看清阴影中的细微细节并根据环境光线进行调整,因此,最好使用色彩准确度优先于亮度的配置文件。
- 体育赛事直播通常采用较窄的动态范围进行母版制作,但通常是在白天观看,因此偏向亮度而非色彩准确度的配置文件可以获得更好的效果。
- 完全交互式内容需要尽可能减少处理以缩短延迟时间,并且需要更高的帧速率,因此许多电视都附带游戏配置文件。
借助此 API,应用可以在个人资料之间切换,用户可以享受调整支持的电视,以便尽可能适合其内容。
다국어 지원
Android 16에서는 기기가 여러 언어로 사용될 때 사용자 환경을 보완하는 기능이 추가되었습니다.
세로 텍스트
Android 16 添加了对垂直渲染和测量文本的低级支持,以便为库开发者提供基本的垂直书写支持。这对于日语等通常使用竖向书写系统的语言特别有用。Paint
类中添加了一个新标志 VERTICAL_TEXT_FLAG
。使用 Paint.setFlags
设置此标志后,Paint 的文本测量 API 将报告垂直进度,而不是水平进度,并且 Canvas
将垂直绘制文本。
val text = "「春は、曙。」"
Box(
Modifier.padding(innerPadding).background(Color.White).fillMaxSize().drawWithContent {
drawIntoCanvas { canvas ->
val paint = Paint().apply { textSize = 64.sp.toPx() }
// Draw text vertically
paint.flags = paint.flags or VERTICAL_TEXT_FLAG
val height = paint.measureText(text)
canvas.nativeCanvas.drawText(
text,
0,
text.length,
size.width / 2,
(size.height - height) / 2,
paint
)
}
}
) {}
측정 시스템 맞춤설정
用户现在可以在“设置”中的地区偏好设置中自定义测量系统。用户偏好设置包含在语言区域代码中,因此您可以在 ACTION_LOCALE_CHANGED
上注册 BroadcastReceiver
,以便在地区偏好设置发生更改时处理语言区域配置更改。
使用格式设置程序有助于提供符合当地体验的服务。例如,对于将手机设置为英语(丹麦)或将手机设置为英语(美国)并将公制作为首选测量系统的用户,“0.5 in”的英语(美国)对应于“12,7 mm”。
如需找到这些设置,请打开“设置”应用,然后依次前往系统 > 语言和地区。