Also if you want to do that programmatically just add the below line to the onCreate of the activity.
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE |
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE );