gpt4 book ai didi

android - 何时使用 CheckBox 何时使用 Switch

转载 作者:IT王子 更新时间:2023-10-28 23:56:46 26 4
gpt4 key购买 nike

谁能告诉我何时使用Checkbox以及何时使用Switch

我的意思是,在 PreferenceActivity 的上下文中,两者之间真正的登录区别是什么?

例如,您会将下一部分更改为 Checkboxes 吗?它是套装的一部分,但在这里使用 Switch 看起来更好。

enter image description here

最佳答案

我实际上发现这是一个非常有趣的问题,特别是考虑到在 Android 中使用复选框可以轻松模拟开关的功能。

根据 Android 开发人员指南,复选框只是一种开关。检查下面的报价或阅读完整描述here .

Checkboxes: Checkboxes allow the user to select multiple options from a set. Avoid using a single checkbox to turn an option off or on. Instead, use an on/off switch.

On/off Switches: On/off switches toggle the state of a single settings option.

关于android - 何时使用 CheckBox 何时使用 Switch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21231345/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com