Android 中的设计、形状

发布于 2024-09-24 23:23:07 字数 109 浏览 1 评论 0 原文

我想知道如何制作像示例这样的形状,具有圆角和屏幕边框的填充,并且还在里面放入文本,这怎么可能? 替代文本

I wounder how its possible to make a shape like the example, with round corners and padding from the screen borders, and also put text inside, how is this possible?
alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

本宫微胖 2024-10-01 23:23:07

您可以使用包含图像背景(例如圆角)的图像按钮,也可以绘制自己的形状,Android 形状

使用 ImageButton 您可以定义按钮的悬停、焦点和默认状态,将背景图像应用于每个状态。

这是一个带有源代码的小代码示例,教程

You can either use image buttons that contain image background with e.g. rounded corners or draw your own shapes, Android Shapes.

Using ImageButton you can define hover, focus and default state of a button and appy a background image to each state.

Here is a small code example with source, tutorial.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文