Code example for ToggleButton

Methods: setTextsetTextOffsetTextOn

0
		button = (ToggleButton) context.findViewById(t.getId());
		p = tower.peek();
		displayText = p != null ? p.size() + "" : "--";
 
		setTowerImageOnButton(t, button);
		button.setTextOn(displayText);
		button.setTextOff(displayText);
		button.setText(displayText);
	} 
 
	/* 
	 * (non-Javadoc) 
	 * @see interfaces.Display#display(interfaces.Playable) 
	 */ 
	public void display(Playable playable) {
		TextView movesText = (TextView) context.findViewById(R.id.moves_text);
		movesText.setText("Moves: " + playable.getNumberOfMoves());
 
		// Update other things 
		TextView messageBox = (TextView) context.findViewById(R.id.message_box_text);
		if (error != null) {