اندروید 14 ویژگی ها و API های عالی را برای توسعه دهندگان معرفی می کند. موارد زیر به شما کمک می کند تا با ویژگی های برنامه های خود آشنا شوید و با API های مرتبط شروع به کار کنید.
برای فهرست دقیق APIهای اضافه شده، اصلاح شده و حذف شده، گزارش تفاوت API را بخوانید. برای جزئیات بیشتر در مورد APIهای اضافه شده به مرجع Android API مراجعه کنید — برای Android 14، به دنبال APIهایی باشید که در سطح API 34 اضافه شده اند. برای آشنایی با مناطقی که تغییرات پلت فرم ممکن است بر برنامه های شما تأثیر بگذارد، حتماً تغییرات رفتار Android 14 را برای برنامه هایی که Android 14 را هدف قرار می دهند و برای همه برنامه ها بررسی کنید.
بین المللی شدن
ترجیحات زبان برای هر برنامه
Android 14 ویژگی های زبان هر برنامه را که در Android 13 (سطح API 33) معرفی شده بود با این قابلیت های اضافی گسترش می دهد:
ایجاد خودکار
localeConfig
یک برنامه : با شروع Android Studio Giraffe Canary 7 و AGP 8.1.0-alpha07، میتوانید برنامه خود را به گونهای پیکربندی کنید که از اولویتهای زبان هر برنامه بهطور خودکار پشتیبانی کند. بر اساس منابع پروژه شما، افزونه Android Gradle فایلLocaleConfig
را تولید می کند و یک مرجع به آن در فایل مانیفست نهایی اضافه می کند، بنابراین دیگر نیازی به ایجاد یا به روز رسانی فایل به صورت دستی ندارید. AGP از منابع موجود در پوشههایres
ماژولهای برنامه شما و هر وابستگی ماژول کتابخانهای برای تعیین مکانهای گنجاندن در فایلLocaleConfig
استفاده میکند.بهروزرسانیهای پویا برای
localeConfig
یک برنامه : از روشهایsetOverrideLocaleConfig()
وgetOverrideLocaleConfig()
درLocaleManager
برای بهروزرسانی پویا فهرست زبانهای پشتیبانیشده برنامه خود در تنظیمات سیستم دستگاه استفاده کنید. از این انعطافپذیری برای سفارشیسازی فهرست زبانهای پشتیبانیشده در هر منطقه، اجرای آزمایشهای A/B یا ارائه فهرست بهروزرسانیشده از مناطق استفاده کنید، اگر برنامه شما از فشارهای سمت سرور برای محلیسازی استفاده میکند.قابلیت مشاهده زبان برنامه برای ویرایشگرهای روش ورودی (IME) : IMEها می توانند از متد
getApplicationLocales()
برای بررسی زبان برنامه فعلی و تطبیق زبان IME با آن زبان استفاده کنند.
Grammatical Inflection API
有 30 亿人在使用区分性别的语言,此类语言的语法类别(例如名词、动词、形容词和介词)会根据您交谈所涉及的人或物的性别而变化。传统上,许多区分性别的语言使用阳性语法性别作为默认或通用性别。
以错误的语法性别来称呼用户,例如以阳性语法性别来称呼女性,可能会对她们的表现和态度产生负面影响。相比之下,界面语言如果能正确反映用户的语法性别,就可以提高用户互动度,并提供更个性化、更自然的用户体验。
To help you build a user-centric UI for gendered languages, Android 14 introduces the Grammatical Inflection API, which lets you add support for grammatical gender without refactoring your app.
ترجیحات منطقه ای
تنظیمات برگزیده منطقه ای به کاربران امکان می دهد واحدهای دما، روز اول هفته و سیستم های شماره گذاری را شخصی کنند. اروپاییای که در ایالات متحده زندگی میکند ممکن است ترجیح دهد واحدهای دما بر حسب سانتیگراد باشد تا فارنهایت و برنامهها به جای پیشفرض یکشنبه ایالات متحده، دوشنبه را بهعنوان آغاز هفته در نظر بگیرند.
منوهای جدید تنظیمات Android برای این تنظیمات برگزیده، مکانی قابل شناسایی و متمرکز را برای تغییر تنظیمات برگزیده برنامه در اختیار کاربران قرار می دهد. این تنظیمات از طریق پشتیبان گیری و بازیابی نیز ادامه می یابد. چندین API و intent - مانند getTemperatureUnit
و getFirstDayOfWeek
- به برنامه شما اجازه خواندن به تنظیمات برگزیده کاربر را می دهند، بنابراین برنامه شما می تواند نحوه نمایش اطلاعات را تنظیم کند. همچنین میتوانید یک BroadcastReceiver
را در ACTION_LOCALE_CHANGED
ثبت کنید تا با تغییر تنظیمات منطقهای، تغییرات پیکربندی محلی را مدیریت کنید.
برای پیدا کردن این تنظیمات، برنامه تنظیمات را باز کنید و به سیستم > زبانها و ورودی > تنظیمات برگزیده منطقهای بروید.


قابلیت دسترسی
مقیاس بندی فونت غیر خطی تا 200٪
Starting in Android 14, the system supports font scaling up to 200%, providing low-vision users with additional accessibility options that align with Web Content Accessibility Guidelines (WCAG).
To prevent large text elements on screen from scaling too large, the system applies a nonlinear scaling curve. This scaling strategy means that large text doesn't scale at the same rate as smaller text. Nonlinear font scaling helps preserve the proportional hierarchy between elements of different sizes while mitigating issues with linear text scaling at high degrees (such as text being cut off or text that becomes harder to read due to an extremely large display sizes).
Test your app with nonlinear font scaling

If you already use scaled pixels (sp) units to define text sizing, then these additional options and scaling improvements are applied automatically to the text in your app. However, you should still perform UI testing with the maximum font size enabled (200%) to ensure that your app applies the font sizes correctly and can accommodate larger font sizes without impacting usability.
To enable 200% font size, follow these steps:
- Open the Settings app and navigate to Accessibility > Display size and text.
- For the Font size option, tap the plus (+) icon until the maximum font size setting is enabled, as shown in the image that accompanies this section.
Use scaled pixel (sp) units for text-sizes
Remember to always specify text sizes in sp units. When your app uses sp units, Android can apply the user's preferred text size and scale it appropriately.
Don't use sp units for padding or define view heights assuming implicit padding: with nonlinear font scaling sp dimensions might not be proportional, so 4sp + 20sp might not equal 24sp.
Convert scaled pixel (sp) units
Use TypedValue.applyDimension()
to convert from sp units
to pixels, and use TypedValue.deriveDimension()
to
convert pixels to sp. These methods apply the appropriate nonlinear scaling
curve automatically.
Avoid hardcoding equations using
Configuration.fontScale
or
DisplayMetrics.scaledDensity
. Because font scaling is
nonlinear, the scaledDensity
field is no longer accurate. The fontScale
field should be used for informational purposes only because fonts are no longer
scaled with a single scalar value.
Use sp units for lineHeight
Always define android:lineHeight
using sp units instead
of dp, so the line height scales along with your text. Otherwise, if your text
is sp but your lineHeight
is in dp or px, it doesn't scale and looks cramped.
TextView automatically corrects the lineHeight
so that your intended
proportions are preserved, but only if both textSize
and lineHeight
are
defined in sp units.
دوربین و رسانه
Ultra HDR برای تصاویر

Android 14 adds support for High Dynamic Range (HDR) images that retain more of the information from the sensor when taking a photo, which enables vibrant colors and greater contrast. Android uses the Ultra HDR format, which is fully backward compatible with JPEG images, allowing apps to seamlessly interoperate with HDR images, displaying them in Standard Dynamic Range (SDR) as needed.
Rendering these images in the UI in HDR is done automatically by the framework
when your app opts in to using HDR UI for its Activity Window, either through a
manifest entry or at runtime by calling
Window.setColorMode()
. You can also capture compressed Ultra
HDR still images on supported devices. With more colors recovered
from the sensor, editing in post can be more flexible. The
Gainmap
associated with Ultra HDR images can be used to render
them using OpenGL or Vulkan.
زوم، فوکوس، Postview و موارد دیگر در پسوند دوربین
Android 14 افزونههای دوربین را ارتقا و بهبود میبخشد، به برنامهها اجازه میدهد تا زمانهای پردازش طولانیتری را مدیریت کنند، که با استفاده از الگوریتمهای محاسباتی فشرده مانند عکاسی در نور کم در دستگاههای پشتیبانیشده، تصاویر بهبودیافته را ممکن میسازد. این ویژگی ها هنگام استفاده از قابلیت های افزونه دوربین، تجربه قوی تری را به کاربران می دهد. نمونه هایی از این پیشرفت ها عبارتند از:
- تخمین تأخیر پردازش عکسبرداری پویا برآوردهای تأخیر ثبت عکس را بر اساس شرایط فعلی صحنه و محیط ارائه می دهد. برای دریافت یک شی
StillCaptureLatency
که دارای دو روش تخمین تأخیر است،CameraExtensionSession.getRealtimeStillCaptureLatency()
را فراخوانی کنید. متدgetCaptureLatency()
تاخیر تخمینی بینonCaptureStarted
وonCaptureProcessStarted()
را برمی گرداند و متدgetProcessingLatency()
تاخیر تخمینی بینonCaptureProcessStarted()
و فریم پردازش شده نهایی موجود را برمی گرداند. - پشتیبانی از تماسهای پیشروی ضبط بهگونهای که برنامهها میتوانند پیشرفت فعلی عملیات پردازش طولانیمدت را نشان دهند. میتوانید بررسی کنید که آیا این ویژگی با
CameraExtensionCharacteristics.isCaptureProcessProgressAvailable
در دسترس است یا خیر، و در صورت وجود، پاسخ تماسonCaptureProcessProgressed()
پیادهسازی میکنید که دارای پیشرفت (از 0 تا 100) به عنوان پارامتر است. فراداده ویژه برنامه افزودنی، مانند
CaptureRequest.EXTENSION_STRENGTH
برای شماره گیری در مقدار افکت افزونه، مانند میزان تاری پس زمینه باEXTENSION_BOKEH
.ویژگی Postview برای Still Capture در پسوندهای دوربین، که تصویری با پردازش کمتر سریعتر از تصویر نهایی ارائه می دهد. اگر یک برنامه افزودنی تأخیر پردازش را افزایش داده باشد، میتوان یک تصویر پسنمایش بهعنوان جایبانی برای بهبود UX ارائه کرد و بعداً برای تصویر نهایی جایگزین شد. می توانید بررسی کنید که آیا این ویژگی با
CameraExtensionCharacteristics.isPostviewAvailable
موجود است یا خیر. سپس می توانید یکOutputConfiguration
بهExtensionSessionConfiguration.setPostviewOutputConfiguration
ارسال کنید.پشتیبانی از
SurfaceView
که امکان یک مسیر رندر پیش نمایش بهینه تر و کم مصرف تر را فراهم می کند.پشتیبانی از ضربه برای فوکوس و زوم در طول استفاده از برنامه افزودنی.
زوم درون سنسور
When REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE
in
CameraCharacteristics
contains
SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW
, your app
can use advanced sensor capabilities to give a cropped RAW stream the same
pixels as the full field of view by using a CaptureRequest
with a RAW target that has stream use case set to
CameraMetadata.SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW
.
By implementing the request override controls, the updated camera gives users
zoom control even before other camera controls are ready.
صدای USB بدون اتلاف
Android 14 gains support for lossless audio formats for audiophile-level
experiences over USB wired headsets. You can query a USB device for its
preferred mixer attributes, register a listener for changes in preferred mixer
attributes, and configure mixer attributes using the
AudioMixerAttributes
class. This class represents the
format, such as channel mask, sample rate, and behavior of the audio mixer. The
class allows for audio to be sent directly, without mixing,
volume adjustment, or processing effects.
بهره وری توسعه دهندگان و ابزار
مدیر اعتبار
Android 14 将 Credential Manager 添加为平台 API,并通过使用 Google Play 服务的 Jetpack 库,向后额外支持 Android 4.4(API 级别 19)设备。Credential Manager 旨在通过 API 使用用户配置的凭据提供程序检索和存储凭据,让用户更轻松地登录。Credential Manager 在单个 API 中支持多种登录方法,包括用户名和密码、通行密钥和联合登录解决方案(如“使用 Google 账号登录”)。
通行密钥具有许多优势。例如,通行密钥是基于业界标准构建的,可在各种不同的操作系统和浏览器生态系统中使用,并且可用于网站和应用。
如需了解详情,请参阅 Credential Manager 和通行密钥文档以及介绍 Credential Manager 和通行密钥的博文。
Health Connect
Health Connect یک مخزن روی دستگاه برای داده های سلامت و تناسب اندام کاربر است. این به کاربران اجازه می دهد تا داده ها را بین برنامه های مورد علاقه خود به اشتراک بگذارند، با یک مکان واحد برای کنترل داده هایی که می خواهند با این برنامه ها به اشتراک بگذارند.
در دستگاههایی که نسخههای اندرویدی قبل از Android 14 دارند، Health Connect برای دانلود به عنوان یک برنامه در فروشگاه Google Play در دسترس است. با شروع اندروید 14، Health Connect بخشی از پلتفرم است و بهروزرسانیها را از طریق بهروزرسانیهای سیستم Google Play بدون نیاز به دانلود جداگانه دریافت میکند. با این کار، Health Connect میتواند بهطور مکرر بهروزرسانی شود و برنامههای شما میتوانند متکی باشند که Health Connect در دستگاههای دارای Android نسخه ۱۴ یا بالاتر در دسترس است. کاربران میتوانند با کنترلهای حریم خصوصی که در تنظیمات سیستم یکپارچه شدهاند، از تنظیمات دستگاه خود به Health Connect دسترسی داشته باشند.


Health Connect شامل چندین ویژگی جدید در اندروید 14 است، مانند مسیرهای ورزشی، که به کاربران امکان می دهد مسیری از تمرین خود را به اشتراک بگذارند که می تواند بر روی نقشه تجسم شود. مسیر به عنوان لیستی از مکانهای ذخیره شده در یک پنجره زمانی تعریف میشود و برنامه شما میتواند مسیرها را در جلسات تمرین وارد کند و آنها را به هم گره بزند. برای اطمینان از اینکه کاربران کنترل کاملی بر این داده های حساس دارند، کاربران باید به اشتراک گذاری مسیرهای فردی با سایر برنامه ها را اجازه دهند.
برای اطلاعات بیشتر، به مستندات Health Connection و پست وبلاگ در مورد چه چیزی در سلامت Android جدید است مراجعه کنید.
به روز رسانی OpenJDK 17
Android 14 continues the work of refreshing Android's core libraries to align with the features in the latest OpenJDK LTS releases, including both library updates and Java 17 language support for app and platform developers.
The following features and improvements are included:
- Updated approximately 300
java.base
classes to Java 17 support. - Text Blocks, which introduce multi-line string literals to the Java programming language.
- Pattern Matching for instanceof, which allows an object to
be treated as having a specific type in an
instanceof
without any additional variables. - Sealed classes, which allow you restrict which classes and interfaces can extend or implement them.
Thanks to Google Play system updates (Project Mainline), over 600 million devices are enabled to receive the latest Android Runtime (ART) updates that include these changes. This is part of our commitment to give apps a more consistent, secure environment across devices, and to deliver new features and capabilities to users independent of platform releases.
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
بهبود برای فروشگاه های برنامه
Android 14 引入了多个 PackageInstaller
API,可帮助应用商店改善其用户体验。
下载之前请求批准安装
安装或更新应用可能需要用户批准。例如,当使用 REQUEST_INSTALL_PACKAGES
权限的安装程序尝试安装新应用时。在之前的 Android 版本中,只有在将 APK 写入安装会话并且提交会话后,应用商店才能请求用户批准。
从 Android 14 开始,requestUserPreapproval()
方法可让安装程序在提交安装会话之前请求用户批准。此项改进可让应用商店将任何 APK 的下载操作推迟到用户批准安装之后。此外,用户批准安装后,应用商店可以在后台下载并安装应用,而不会干扰用户。
承担未来更新的责任
借助 setRequestUpdateOwnership()
方法,安装程序可以向系统表明它打算负责将被安装的应用未来的更新。此 capability 可实现更新所有权强制执行,即仅允许更新所有者为应用安装自动更新。更新所有权强制执行有助于确保用户仅收到来自预期应用商店的更新。
任何其他安装程序(包括使用 INSTALL_PACKAGES
权限的安装程序)都必须获得用户的明确批准,才能安装更新。如果用户决定继续从其他来源安装更新,则会失去更新所有权。
在干扰较少的时段更新应用
应用商店通常希望避免更新正在使用的应用,因为这会导致应用正在运行的进程被终止,而这可能会中断用户正在执行的操作。
从 Android 14 开始,InstallConstraints
API 让安装程序可以确保其应用更新在适当的时机进行。例如,应用商店可以调用 commitSessionAfterInstallConstraintsAreMet()
方法来确保仅在用户不再与相应应用互动时才进行更新。
无缝安装可选拆分
借助拆分 APK,应用的功能可以通过单独的 APK 文件提供,而不是以单体式 APK 的形式提供。借助拆分 APK,应用商店可以优化不同应用组件的提供。例如,应用商店可能会根据目标设备的属性进行优化。自在 API 级别 22 中引入以来,PackageInstaller
API 一直支持拆分。
在 Android 14 中,setDontKillApp()
方法可让安装程序指明在安装新的拆分项时应用的运行进程不应终止。应用商店可以使用此功能,在用户使用应用时无缝安装应用的新功能。
بستههای فراداده برنامه
从 Android 14 开始,Android 软件包安装程序可让您指定应用元数据(例如数据安全做法),以在 Google Play 等应用商店页面上架。
تشخیص زمانی که کاربران از دستگاه عکس می گیرند
为了打造更加标准化的屏幕截图检测体验,Android 14 引入了可保护隐私的屏幕截图检测 API。借助此 API,应用可以按 activity 注册回调。如果用户在该 activity 可见时截取屏幕截图,系统会调用这些回调并通知用户。
تجربه کاربری
اقدامات سفارشی اشتراکگذاری و رتبهبندی بهبود یافته
Android 14 updates the system sharesheet to support custom app actions and more informative preview results for users.
Add custom actions
With Android 14, your app can add custom actions to the system sharesheet it invokes.

Improve ranking of Direct Share targets
Android 14 uses more signals from apps to determine the ranking of the direct share targets to provide more helpful results for the user. To provide the most useful signal for ranking, follow the guidance for improving rankings of your Direct Share targets. Communication apps can also report shortcut usage for outgoing and incoming messages.

پشتیبانی از انیمیشن های داخلی و سفارشی برای Predictive Back
Android 13 introduced the predictive back-to-home animation behind a developer option. When used in a supported app with the developer option enabled, swiping back shows an animation indicating that the back gesture exits the app back to the home screen.
Android 14 includes multiple improvements and new guidance for Predictive Back:
- You can set
android:enableOnBackInvokedCallback=true
to opt in to predictive back system animations per-Activity instead of for the entire app. - We've added new system animations to accompany the back-to-home animation from Android 13. The new system animations are cross-activity and cross-task, which you get automatically after migrating to Predictive Back.
- We've added new Material Component animations for Bottom sheets, Side sheets, and Search.
- We've created design guidance for creating custom in-app animations and transitions.
- We've added new APIs to support custom in-app transition animations:
handleOnBackStarted
,handleOnBackProgressed
,handleOnBackCancelled
in
OnBackPressedCallback
onBackStarted
,onBackProgressed
,onBackCancelled
in
OnBackAnimationCallback
- Use
overrideActivityTransition
instead ofoverridePendingTransition
for transitions that respond as the user swipes back.
With this Android 14 preview release, all features of Predictive Back remain behind a developer option. See the developer guide to migrate your app to predictive back, as well as the developer guide to creating custom in-app transitions.
تولیدکننده دستگاه صفحه بزرگ برای هر برنامه لغو می شود
借助按应用替换项,设备制造商可以更改应用在大屏设备上的行为。例如,FORCE_RESIZE_APP
替换项会指示系统调整应用大小以适应显示屏尺寸(避免进入尺寸兼容模式),即使在应用清单中设置了 resizeableActivity="false"
也是如此。
替换项旨在改善大屏设备上的用户体验。
借助新的清单属性,您可以为应用停用某些设备制造商替换项。
صفحه نمایش بزرگ کاربر در هر برنامه لغو می شود
Per-app overrides change the behavior of apps on large screen devices. For example, the OVERRIDE_MIN_ASPECT_RATIO_LARGE
device manufacturer override sets the app aspect ratio to 16:9 regardless of the app's configuration.
Android 14 QPR1 enables users to apply per‑app overrides by means of a new settings menu on large screen devices.
اشتراک گذاری صفحه نمایش برنامه
App screen sharing enables users to share an app window instead of the entire device screen during screen content recording.
With app screen sharing, the status bar, navigation bar, notifications, and other system UI elements are excluded from the shared display. Only the content of the selected app is shared.
App screen sharing improves productivity and privacy by enabling users to run multiple apps but limit content sharing to a single app.
پاسخ هوشمند مبتنی بر LLM در Gboard در Pixel 8 Pro
On Pixel 8 Pro devices with the December Feature Drop, developers can try out higher-quality smart replies in Gboard powered by on-device Large Language Models (LLMs) running on Google Tensor.
This feature is available as a limited preview for US English in WhatsApp, Line, and KakaoTalk. It requires using a Pixel 8 Pro device with Gboard as your keyboard.
To try it out, first enable the feature in Settings > Developer Options > AiCore Settings > Enable Aicore Persistent.
Next, open a conversation in a supported app to see LLM-powered Smart Reply in Gboard's suggestion strip in response to incoming messages.
گرافیک
مسیرها قابل پرس و جو و درون یابی هستند
Android 的 Path
API 是一种强大且灵活的机制,可用于创建和渲染矢量图形,能够描边或填充路径、根据线段或二次曲线或立方曲线构建路径、执行布尔运算以获取更复杂的形状,或同时执行所有这些操作。但有一个限制是,您无法了解 Path 对象中实际包含的内容;该对象的内部信息在创建后对调用方是不透明的。
如需创建 Path
,您可以调用 moveTo()
、lineTo()
和 cubicTo()
等方法来添加路径段。但是,无法询问该路径有哪些片段,因此您必须在创建时保留该信息。
从 Android 14 开始,您可以查询路径以了解其内部内容。首先,您需要使用 Path.getPathIterator
API 获取 PathIterator
对象:
Kotlin
val path = Path().apply { moveTo(1.0f, 1.0f) lineTo(2.0f, 2.0f) close() } val pathIterator = path.pathIterator
Java
Path path = new Path(); path.moveTo(1.0F, 1.0F); path.lineTo(2.0F, 2.0F); path.close(); PathIterator pathIterator = path.getPathIterator();
接下来,您可以调用 PathIterator
逐个遍历片段,并检索每个片段的所有必要数据。以下示例使用了 PathIterator.Segment
对象,它会为您打包数据:
Kotlin
for (segment in pathIterator) { println("segment: ${segment.verb}, ${segment.points}") }
Java
while (pathIterator.hasNext()) { PathIterator.Segment segment = pathIterator.next(); Log.i(LOG_TAG, "segment: " + segment.getVerb() + ", " + segment.getPoints()); }
PathIterator
还有一个非分配版 next()
,您可以在其中传入缓冲区来保存点数据。
查询 Path
数据的一个重要用例是插值。例如,您可能想在两个不同的路径之间添加动画(或变形)。为了进一步简化该用例,Android 14 针对 Path
还包含 interpolate()
方法。假设两个路径具有相同的内部结构,interpolate()
方法会使用该插值结果创建一个新的 Path
。以下示例返回了一个形状介于 path
和 otherPath
之间的一半(线性插值为 0.5)的路径:
Kotlin
val interpolatedResult = Path() if (path.isInterpolatable(otherPath)) { path.interpolate(otherPath, .5f, interpolatedResult) }
Java
Path interpolatedResult = new Path(); if (path.isInterpolatable(otherPath)) { path.interpolate(otherPath, 0.5F, interpolatedResult); }
Jetpack graphics-path 库也为早期版本的 Android 启用了类似的 API。
مش های سفارشی با سایه زن های راس و قطعه
Android has long supported drawing triangle meshes with custom shading, but the input mesh format has been limited to a few predefined attribute combinations. Android 14 adds support for custom meshes, which can be defined as triangles or triangle strips, and can, optionally, be indexed. These meshes are specified with custom attributes, vertex strides, varying, and vertex and fragment shaders written in AGSL.
The vertex shader defines the varyings, such as position and color, while the
fragment shader can optionally define the color for the pixel, typically by
using the varyings created by the vertex shader. If color is provided by the
fragment shader, it is then blended with the current Paint
color using the blend mode selected when
drawing the mesh. Uniforms can be passed
into the fragment and vertex shaders for additional flexibility.
رندر بافر سخت افزاری برای Canvas
To assist in using Android's Canvas
API to draw with
hardware acceleration into a HardwareBuffer
, Android 14
introduces HardwareBufferRenderer
. This API is
particularly useful when your use case involves communication with the system
compositor through SurfaceControl
for low-latency
drawing.