Android 遍历界面控件

//遍历界面上的控件 fubin.pan  
LinearLayout sLinerLayout = (LinearLayout)findViewById(R.id.layout_scr);  
for (int i = 0; i < sLinerLayout.getChildCount(); i++) {  
    View v=sLinerLayout.getChildAt(i);  
    if ( v instanceof RadioGroup){  
        RadioGroup mRadioGroup = (RadioGroup)sLinerLayout.getChildAt(i);  
        //根据ID获取RadioButton的实例                   
        RadioButton rb = (RadioButton)questionitemlist2.this.findViewById(mRadioGroup.getCheckedRadioButtonId());  
        if (rb.getTag(R.id.tag_toend).toString().equals(""))//判断ToEnd监听  
        {  
              
        }else if(rb.getTag(R.id.tag_tonext).toString().equals(""))//判断ToNext监听  
        {  
              
        }  
    }  
  
}  

Android 遍历界面控件

Android 遍历界面控件,布布扣,bubuko.com

Android 遍历界面控件

上一篇:用Spring的mappingDirectoryLocations来配置Hibernate映射文件


下一篇:android 软键盘回车键捕获