{"id":259,"date":"2015-04-10T15:08:15","date_gmt":"2015-04-10T20:08:15","guid":{"rendered":"http:\/\/jebware.com\/blog\/?p=259"},"modified":"2016-11-21T21:13:56","modified_gmt":"2016-11-22T02:13:56","slug":"android-inputtypes-and-keyboards","status":"publish","type":"post","link":"https:\/\/jebware.com\/blog\/?p=259","title":{"rendered":"Android InputTypes and Keyboards"},"content":{"rendered":"<p>When reading\u00a0input from an Android user with an EditText, you have a\u00a0simple way to help that user out by setting the InputType. \u00a0If you need the user to input a number, for example, you set the number InputType, and the user will automatically key a numeric keypad instead of the full QWERTY. \u00a0This saves the user a little bit of time and mental energy, and helps avoid mistakes with input.<\/p>\n<p>Beyond just text and numbers, though, are a range of options that produce very subtle changes in the keyboard that Android brings up. \u00a0Below I explore which options bring up which keypad by default.<\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"wp-image-260 size-medium alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-04-55-168x300.png\" alt=\"Screenshot_2015-04-10-12-04-55\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-04-55-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-04-55-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-04-55.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>First, the standard keyboard, which covers a lot of the input types.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_CLASS_TEXT\">TYPE_CLASS_TEXT<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_EMAIL_SUBJECT\">TYPE_TEXT_VARIATION_EMAIL_SUBJECT<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_LONG_MESSAGE\">TYPE_TEXT_VARIATION_LONG_MESSAGE<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_PERSON_NAME\">TYPE_TEXT_VARIATION_PERSON_NAME<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_POSTAL_ADDRESS\">TYPE_TEXT_VARIATION_POSTAL_ADDRESS<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_PASSWORD\">TYPE_TEXT_VARIATION_PASSWORD<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_VISIBLE_PASSWORD\">TYPE_TEXT_VARIATION_VISIBLE_PASSWORD<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_WEB_EDIT_TEXT\">TYPE_TEXT_VARIATION_WEB_EDIT_TEXT<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_FILTER\">TYPE_TEXT_VARIATION_FILTER<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_PHONETIC\">TYPE_TEXT_VARIATION_PHONETIC<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_WEB_PASSWORD\">TYPE_TEXT_VARIATION_WEB_PASSWORD<\/a><\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"size-medium wp-image-261 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-02-168x300.png\" alt=\"Screenshot_2015-04-10-12-05-02\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-02-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-02-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-02.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>For our first subtle variation, the URI keyboard replaces the comma with a slash.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_URI\">TYPE_TEXT_VARIATION_URI<\/a><\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"size-medium wp-image-262 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-07-168x300.png\" alt=\"Screenshot_2015-04-10-12-05-07\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-07-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-07-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-07.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>Next, the email keyboard replaces the comma\u00a0with an @.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_EMAIL_ADDRESS\">TYPE_TEXT_VARIATION_EMAIL_ADDRESS<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS\">TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS<\/a><\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"size-medium wp-image-263 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-23-168x300.png\" alt=\"Screenshot_2015-04-10-12-05-23\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-23-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-23-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-05-23.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>The short message keyboard replaces the enter key with emoji access.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_TEXT_VARIATION_SHORT_MESSAGE\">TYPE_TEXT_VARIATION_SHORT_MESSAGE<\/a><\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"size-medium wp-image-264 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-22-168x300.png\" alt=\"Screenshot_2015-04-10-12-06-22\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-22-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-22-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-22.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>The other main keyboard is for numeric entry.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_CLASS_NUMBER\">TYPE_CLASS_NUMBER<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_NUMBER_FLAG_DECIMAL\">TYPE_NUMBER_FLAG_DECIMAL<\/a><br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_NUMBER_FLAG_SIGNED\">TYPE_NUMBER_FLAG_SIGNED<\/a><\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"size-medium wp-image-265 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-40-168x300.png\" alt=\"Screenshot_2015-04-10-12-06-40\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-40-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-40-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-40.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>The number password variant reduces the available symbols and focuses just on the numbers.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_NUMBER_VARIATION_PASSWORD\">TYPE_NUMBER_VARIATION_PASSWORD<\/a><\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"size-medium wp-image-266 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-56-168x300.png\" alt=\"Screenshot_2015-04-10-12-06-56\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-56-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-56-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-06-56.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>The phone class\u00a0adds some symbols common for phone number formatting, plus star &amp; hash.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_CLASS_PHONE\">TYPE_CLASS_PHONE<\/a><\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"size-medium wp-image-267 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-17-168x300.png\" alt=\"Screenshot_2015-04-10-12-07-17\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-17-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-17-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-17.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>The date\/time class gives you a slash and colon for formatting.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_CLASS_DATETIME\">TYPE_CLASS_DATETIME<\/a><\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"size-medium wp-image-268 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-23-168x300.png\" alt=\"Screenshot_2015-04-10-12-07-23\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-23-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-23-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-23.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>The date variant only allows for a slash.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_DATETIME_VARIATION_DATE\">TYPE_DATETIME_VARIATION_DATE<\/a><\/p>\n<p class=\"alignleft\"><img loading=\"lazy\" class=\"size-medium wp-image-269 alignleft\" src=\"http:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-29-168x300.png\" alt=\"Screenshot_2015-04-10-12-07-29\" width=\"168\" height=\"300\" srcset=\"https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-29-168x300.png 168w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-29-576x1024.png 576w, https:\/\/jebware.com\/blog\/wp-content\/uploads\/2015\/04\/Screenshot_2015-04-10-12-07-29.png 1080w\" sizes=\"(max-width: 168px) 85vw, 168px\" \/>The time variant only allows a colon.<br \/>\n<a href=\"http:\/\/developer.android.com\/reference\/android\/text\/InputType.html#TYPE_DATETIME_VARIATION_TIME\">TYPE_DATETIME_VARIATION_TIME<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When reading\u00a0input from an Android user with an EditText, you have a\u00a0simple way to help that user out by setting the InputType. \u00a0If you need the user to input a number, for example, you set the number InputType, and the user will automatically key a numeric keypad instead of the full QWERTY. \u00a0This saves the &hellip; <a href=\"https:\/\/jebware.com\/blog\/?p=259\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Android InputTypes and Keyboards&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"twitterCardType":"","cardImageID":0,"cardImage":"","cardTitle":"","cardDesc":"","cardImageAlt":"","cardPlayer":"","cardPlayerWidth":0,"cardPlayerHeight":0,"cardPlayerStream":"","cardPlayerCodec":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/259"}],"collection":[{"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=259"}],"version-history":[{"count":28,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/259\/revisions"}],"predecessor-version":[{"id":297,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/259\/revisions\/297"}],"wp:attachment":[{"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jebware.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}