RadioGroup checkedButton property

前端 未结 4 1723
盖世英雄少女心
盖世英雄少女心 2021-02-13 11:49

I am trying to build RadioGroup in Android with one RadioButton checked by default. I\'m wondering if this is possible to do through XML, rather than programmatically.

T

4条回答
  •  再見小時候
    2021-02-13 12:08

    You can get rid of that error by declaring id rdb_positive inside ids.xml and then referencing the id from both RadioGroup and RadioButton elements.

     
         
        
    
    

    ids.xml:

    
        
    
    

提交回复
热议问题