如何创建具有3个选项切换按钮...?选项、按钮

由网友(心只为你停留)分享简介:我想用3个选项创建一个切换按钮。我不想使用单选按钮或复选框。I want to create a toggle button with 3 options.I don't want to use radio button or check box.我要创建这样的.... I want to create lik...

我想用3个选项创建一个切换按钮。我不想使用单选按钮或复选框。

I want to create a toggle button with 3 options. I don't want to use radio button or check box.

我要创建这样的....

I want to create like this....

如何建立这个......?

How to create this...?

在此先感谢...!

推荐答案

左/中/右按钮创建的艺术品和水平线性布局创建相邻的三个独立按键

Create the artwork for the left/middle/right buttons and create three separate buttons next to each other in a horizontal linear layout

然后在code得到所有三个引用到按钮。当按钮被点击设置一个布尔值,例如_button1Clicked = TRUE(或使用数组?)和图像设置为唐斯泰特,检查其他按钮,设置它们的图像北部和布尔值重置为假的!

Then in code get all three references to the buttons. When a button is clicked set a boolean e.g _button1Clicked = true (or use an array?) and set the image to a downstate, check the other buttons, set their images to upstate and reset their booleans to false!

轻松!

阅读全文

相关推荐

最新文章