Skip to content

Instantly share code, notes, and snippets.

@XinyueZ
Created August 20, 2014 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XinyueZ/cc0be271686491dcf6e6 to your computer and use it in GitHub Desktop.
Save XinyueZ/cc0be271686491dcf6e6 to your computer and use it in GitHub Desktop.
Avoid keyboard showing at starting activity that holds EditText.
<LinearLayout
android:layout_width="0dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_height="0dp">
<requestFocus />
</LinearLayout>
<!--Just a random EditText.-->
<EditText
android:id="@+id/rotate_me_angle_et"
android:layout_width="wrap_content"
android:gravity="right"
android:layout_height="wrap_content"
android:hint="Rotate angle"
android:text="360"
android:inputType="numberSigned" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment