Android 中是否有开发人员可以使用的内置按钮?
我想尝试获得与应用程序底部的选项卡类似的漂亮按钮,但我想知道是否有这样的内置按钮:
这将使导航更好,并且开发更容易&如果是的话,速度会更快。
I want to try to get nice buttons that will work similar to tabs down the bottom of my app, but I am wondering if there are buttons like this built in:
It would make navigation better, and developing a lot easier & faster if they are.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的示例屏幕截图显示了一个几乎未受影响的 Android 2.2 启动器。由于它是开源的,您可以看看它是如何完成的。 这是它使用的布局文件。
请注意底部的relativelayout,其中包含三个“hotseat”按钮。它们每个都使用自定义样式来获取外观,这些样式定义为 此处。
Your example screenshot is showing a mostly-untouched stock Android 2.2 launcher. Since it's open source you can take a look at how it's done. Here's the layout file it uses.
Note the RelativeLayout at the bottom containing the three "hotseat" buttons. Each of them uses a custom style to get the appearance, those styles are defined here.
图片中显示的是 HTC Sense Launcher。它是一个附加组件,不是核心 Android 操作系统的一部分。
顺便说一句,像这样自定义透明按钮很容易。如果您需要任何帮助,请告诉我。
更新:
使用此示例创建一个自定义对话框,该对话框不是模态的,并且是浮动且透明的。
对话框布局为:
这是带有进度条、文本和取消按钮的进度对话框的示例。您可以轻松地将其更改为三个按钮。请注意,按钮对于图标和文本是透明的。
What you are showing in the picture is HTC Sense Launcher. It's an add-on and not part of core Android OS.
BTW it's easy to do custom transparent button like this. Let me know if you need any help with this.
Update:
Use this example to create a custom Dialog, that is not modal and is floating and transparent.
And the dialog layout is:
This is an example of a progress dialog with progress bar, text and cancel button. You can easily change this to three buttons. Note that button is transparent with icon and text.