Code example for LinearLayout

Methods: getVisibility, setVisibility

0
	@Override 
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if ((keyCode == KeyEvent.KEYCODE_BACK)) {
			selectButton.setEnabled(false);
 
			if (layoutCreate.getVisibility() == View.VISIBLE) {
				layoutCreate.setVisibility(View.GONE);
				layoutSelect.setVisibility(View.VISIBLE);
			} else { 
				if (!currentPath.equals(ROOT)) {
					getDir(parentPath);
				} else { 
					return super.onKeyDown(keyCode, event);
				} 
			} 
 
			return true; 
		} else { 
			return super.onKeyDown(keyCode, event);
		} 
	}