Code example for RadioButton

Methods: setText, setChecked

0
		Log.d(TAG, "New RadioButton input from XML node " + n.toString());
		LayoutInflater mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		view = (RadioButton) mInflater.inflate(AmlBuilder.localResources.getInt("aml_input_radiobutton"), null);
		Node label = n.getChildNodes().item(0);
		Node checkedNode = n.getAttributes().getNamedItem("checked");
		if (label != null) view.setText(label.getNodeValue());
		String checked = "";
		if (checkedNode != null) checked = checkedNode.getNodeValue().toLowerCase();
		view.setChecked(checked.equals("yes"));
		AmlBuilder.applyActionAttribute(view, "tap", n.getAttributes().getNamedItem("tap"));
		AmlBuilder.applyActionAttribute(view, "hold", n.getAttributes().getNamedItem("hold"));
		Log.d(TAG, "New RadioButton input construction complete from XML node " + n.toString());
	} 
 
	/** 
	 * Get the View created from this object 
	 * @return View to be inserted into parent layout 
	 */ 
	public RadioButton getView() {
		return view;
	}