Compose 中的图像和图形
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在 Android 应用中使用明亮动人的视觉元素有助于改善应用的外观和风格。在 Android 中,您可以通过几种不同的方式在屏幕上直观呈现内容:使用矢量、位图,或利用屏幕上的画布直接绘制。本部分会向您介绍如何使用这些不同类型的图形。
通过以下详细信息了解如何使用图片:
您还可以在此处详细了解如何使用图形。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[],[],null,["# Images and graphics in Compose\n\nUsing bright, engaging visuals in your Android apps can help improve the look\nand feel of your application. In Android, there are a few different ways in\nwhich you can render something visually on screen- using either a vector,\nbitmap, or directly drawing with a canvas on screen. In this section, learn\nhow to work these different kinds of graphics.\n\nLearn how to work with images using these details:\n\n- [Loading images](/develop/ui/compose/graphics/images/loading): Learn how to load an image from disk or the internet\n- [ImageBitmap versus ImageVector](/develop/ui/compose/graphics/images/compare): Learn how to work with the two most common image formats, raster and vector.\n- [Material icons](/develop/ui/compose/graphics/images/material): Learn about a convenient way to draw a single color icon on the screen, following Material Design 3 guidelines.\n- [Customize an image](/develop/ui/compose/graphics/images/customize): Learn how to customize an image using properties of an Image composable.\n- [Custom painter](/develop/ui/compose/graphics/images/custompainter): Learn about custom painter objects to additionally customize your image.\n- [Optimizing performance](/develop/ui/compose/graphics/images/optimization): Learn about how to best work with images to avoid performance issues.\n\nYou can also learn more about working with Graphics [here](/develop/ui/compose/graphics/graphics-sub)."]]