Code example for RelativeLayout

Methods: getChildAt, getChildCount

0
				convertView = getLayoutInflater().inflate(R.layout.mycontrol, null);
			} 
			 
			RelativeLayout layout = (RelativeLayout) convertView;
			 
			for (int i = 0; i < layout.getChildCount(); i++)
			{ 
				if (layout.getChildAt(i).getId() == R.id.TextView01)
				{ 
					TextView t = (TextView) layout.getChildAt(i);
			//		if (t != null) 
						t.setText(items[position]);		
				} 
				else if (layout.getChildAt(i).getId() == R.id.CheckBox01)
				{ 
					CheckBox c = (CheckBox) layout.getChildAt(i);
					c.setTag(position);
					c.setChecked(states[position]);
					c.setOnCheckedChangeListener(this);
				} 
			} 
Experience pair programming with AI  Get Codota for Java