[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Discovery and promotion\n\nApp widgets allow your user to deliver key glanceable content and quick actions\nfrom your app on their home screens and similar surfaces. Improving your\nwidget's discoverability ensures users are aware of these powerful extensions of\nyour app.\n\nUsers discover and add your widget through the widget picker, as shown from\nthe **Widgets** menu that appears when they long-press on the home screen or on\nyour app icon. On some devices, the widget picker displays a suggestions section\nthat shows quality widgets. Additionally, you can promote your widget from\nwithin your app at relevant moments when the widget's functionality is most\nrelevant. This guide describes how to to effectively promote your widgets.\n\nSizing\n------\n\nImagine the widget picker as a shopping window. Your widget's default size is\nits initial display, making a first impression that can greatly influence\nselection. Use a size that effectively showcases your widget's functionality\nwithout cluttering the view.\n\nFor more information on choosing an appropriate default size for your widget,\nsee [Sizing](/design/ui/mobile/guides/widgets/sizing).\n| **Tip:** Specify the `targetCellWidth` and `targetCellHeight` to one of the sizes discussed in the sizing guidance. Ensure that the minimum sizes specified meets the target cell size across most devices in portrait and landscape orientation.\n\nWhen designing for the default size, consider different form factors such as\nphones, tablets and foldables. \ncancel\n\n### Don't\n\nSet the same default sizes across all device sizes, make sure to set specific sizes based of each form factors grid sizes.\n\nAvoid publishing multiple versions of the same widget size solely to offer\ndifferent colors or shapes. Instead, incorporate a configuration activity within\nthe widget to allow users to customize colors, enhancing flexibility and\nstreamline the widget picker. \ncancel\n\n### Don't\n\nProvide multiple widgets with the same purpose, instead use a configuration activity to customize shapes.\n\nContent preview\n---------------\n\nDrive user adoption of your widget by providing an accurate and informative\ncontent preview. By mirroring the actual layout and functionality of the widget\nin the preview, you provide users with a clear understanding of what they can\nexpect once they add it to their home screen. \ncancel\n\n### Don't\n\nLeave out a preview, as this will cause the widget preview to show only an image app icon. \ncheck_circle\n\n### Do\n\nProvide quality previews that are accurate to the widget size. \ncancel\n\n### Don't\n\nProvide a preview that isn't accurate to the widget size.\n**Tip:** You can specify a layout xml resource for your previews using `android:previewLayout`. For more information, see [Improve widget picker experience](/develop/ui/views/appwidgets/enhance#improve-widget-picker-experience). \ncancel\n\n### Don't\n\nChange the widget's shape or size when the user initially drops it onto the home screen.\n\nIf your widget supports dynamic colors, design your previews to also display in\nthose colors. Craft a clear and concise description for your widget that\nprovides a clear value proposition for the user.\n\nIn-app discovery of your widget\n-------------------------------\n\nYou can proactively surface the option to pin relevant widgets at contextually\nappropriate moments in your app. When doing so keep the following factors in\nmind:\n\n- Present the pin widget option when it makes the most sense based on the user's actions within the app. For example, after a user successfully completes a task that has a corresponding widget or When a user repeatedly accesses a feature that could be streamlined with a widget.\n- Use subtle visual hints such as an icon or a brief animation to draw attention to the option to pin a widget.\n- The widget pinning suggestion should never block or hinder the user's primary actions within your app.\n\nFor more information, see [Let users pin a widget](/develop/ui/views/appwidgets/discoverability#pin) to configure widget\npinning from within your app."]]