问题标签 [radio-group]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
201 浏览

android - 每次通过光标迭代记录后更新单选按钮

我有三个单选按钮和一个方法,每次单击“下一步”按钮时。下一条记录将使用 setonclickListener 显示。目标是清除每条记录后的所有单选按钮。

0 投票
12 回答
36934 浏览

android - RadioGroup 有两列有十个 RadioButtons

我有一个RadioGroup,我想在两列和五行中将按钮彼此相邻对齐,但我无法实现。我尝试过的事情:

  1. RelativeLayout-> 外部RadioGroup-> 内部RadioGroup。全部RadioButtons被选中,但我只想选择一个。
  2. RadioGroup: 方向
  3. 跨度,拉伸柱
  4. TableRow
  5. TableLayout

请让我知道如何创建一RadioGroup列和两列以及其中RadioButtons的许多列。

0 投票
21 回答
48025 浏览

android - 如何从不同的线性布局中对 RadioButton 进行分组?

我想知道是否可以将每个单曲分组RadioButton到一个独特的RadioGroup 维护相同的结构中。我的结构如下所示:

  • 线性布局_main
    • 线性布局_1
      • 单选按钮1
    • 线性布局_2
      • 单选按钮2
    • 线性布局_3
      • 单选按钮3

如您所见,现在每个RadioButton都是不同的孩子LinearLayout。我尝试使用下面的结构,但它不起作用:

  • 无线电集团
    • 线性布局_main
      • 线性布局_1
        • 单选按钮1
      • 线性布局_2
        • 单选按钮2
      • 线性布局_3
        • 单选按钮3
0 投票
1 回答
938 浏览

android - 如何在 Android 上的 ListView 中对 RadioGroup 进行编程

我的句柄 RadioGrup 有问题。应用程序从 OCR 中获取字符串,该字符串被剪切并扔到带有 4 个 RadioButtons 的列表视图列表上的适配器中,并且它已经在运行。 http://dl.dropbox.com/u/158361/screenshot-1336249818620.png

如屏幕截图所示,我根据按下的单选按钮将列表中的项目返回到 4 EditText。选择raiobutton后如何发送字符串?

我的代码:

还有我的适配器:

0 投票
4 回答
22500 浏览

android - Android radiogroup,单选按钮之间的分隔符

RadioButtons有没有一种简单的方法可以在a之间添加分隔符RadioGroup?我试过使用dividerxml 属性,但它似乎不起作用。如果它是相关的RadioGroup,我的布局中不包含任何子视图;我正在以RadioButtons编程方式添加。

编辑:问题解决了。RadioButton您可以在RadioGroupxml之外添加视图。在我的情况下,您也可以通过编程方式执行此操作,但请注意您的布局参数。Akki 有正确的想法,这对我有用:

0 投票
2 回答
17515 浏览

extjs - Ext JS 4 无线电组检查事件

我正在使用 FormPanel 中的 xtype 在 extJS 4 中创建一个 radioGroup。我试图在检查收音机后立即启用/禁用文本字段。

我很困惑在哪里添加检查/单击事件的侦听器。提前致谢。

0 投票
1 回答
2644 浏览

android - Android 动态 RadioGroup

我正在尝试制作均衡器 RadioGroup。而且我想为预设动态添加单选按钮。

这是我的布局 XML:

这是Java代码:

当此活动打开时,仅显示空白布局屏幕。我错过了什么?

谢谢

0 投票
1 回答
13615 浏览

android - android以编程方式在radiogroup按钮之间添加填充

我在 xml 中有一个单选组,按钮是通过编程方式生成的。如何以编程方式在按钮之间添加间距。

我认为这有点像LayoutParams,但我的对象没有明显setPaddingsetMargins方法。

这就是我正在尝试的

0 投票
1 回答
143 浏览

image - Display image on website depending on combination of multiple radio groups

Imagine a webshop where you can buy custom clothes. The user is asked to choose two kinds of colors for his new t-shirt: primary and secondary color. This is done by 2 radiogroups. Depending on the colors the user chooses, an image will be shown, showing the shirt in the selected colors.

My problem is pretty similar, so I will describe it a little bit more abstractly:

I have 2 radiogroups, with 4 radio buttons each on my website:

Now i want to display an image on my website, depending on the combination of those two groups.

i.e.: user selects A from group 1 and B from group 2 --> display image1

i.e.: user slects A from group 1 and A from group B --> display image2

i.e.: user selects B from group 1 and nothing from group B --> display image3

and so forth...

Any ideas on how to do this?! After three days of thinking and Google-research, I've got nothing so far :( Maybe an Java array will be needed?? I'm open for suggestions :)

0 投票
0 回答
1199 浏览

android - findViewById 为 radioGroup 返回 null 但找到了 radioButtons?

我有一个执行以下操作的 Activity

xml就是这个

我的问题是找到了所有按钮,但单选组始终返回 null。我想使用那个 RadioGroup 来找出哪个按钮被选中。可以找到单选组内的按钮但单选组本身不能找到对我来说没有意义吗?