[英]I have a radio group and in this radio group i have two radio buttons. how can i make Radio Button non-clickable in android?
[英]How can i create a Radio group in java code in Android?
我想在Java代碼中為Android應用程序動態創建Radio組和單選按鈕。
我不確定是否可以將TextView
添加到RadioGroup
,但是可以嘗試:
RadioGroup rg = new RadioGroup(getContext());
RadioButton rb1 = new RadioButton(getContext());
RadioButton rb2 = new RadioButton(getContext());
TextView tv = new TextView(getContext());
rg.addView(rb1);
rg.addView(rb2);
rg.addView(tv);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.