Android Application Development Tutorial - 27 - Set the Input Type of an EditText

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
18,060
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 19, 2011

Check out the full series at http://www.thenewboston.com/

Here is a link to the mybringback YouTube Channel. Go and subscribe now!

http://www.youtube.com/user/mybringback

Also, the mybringback official website:

http://mybringback.com/

  • likes, 1 dislikes

Link to this comment:

Share to:

Top Comments

  • '|' is not a pipe, it's a bitwise OR. It takes two binary numbers and if either of the bits of equal value are 1, that bit in the answer is 1. e.g.:

    1010

    1001

    ------

    1011

    How this relates to the input type: Each of the InputTypes are actually just ints. TYPE_CLASS_TEXT is 1, and TYPE_TEXT_VARIATION_PASSWORD is 128 (or 10000000). Perform a bitwise OR on them:

    00000001

    10000000

    ------------

    10000001 which is 129. Try entering input.setInputType(129); instead, you'll see it'll work. :)

  • Thanks for posting some tutorials about Android. However, I'm finding myself skipping through 90% of each tutorial because the topics about Java basics could be tutorials in of themselves under your Java section. I came here to learn about Android. What you DON'T want is people that don't know anything about programming and making crappy apps.. jk, but not really ;) . And yes, "pipes" are common knowledge in shell scipting/command line. Good job though for making these tutorials.

see all

All Comments (32)

Sign In or Sign Up now to post a comment!
  • Tutorials at 4:05 in the morning Travis?! That's some serious dedication to helping your fans! THANKS!

  • Thanks for making these tutorials, Travis. They are really helping me along.

  • @danielson233 I apologize if the comment came off as arrogant. My intention was more of constructive criticism. Programming doesn't have to be an elite practice. There are resources everywhere on how to program. I highly recommend learning the foundation language that the Android API was built upon. Those armed with the knowledge will write faster, more robust applications.Tell me I'm wrong. I'm trying to help steer people in the right direction here...

  • @wetwilly543 I believe this a big problem with programmers. they typically have close to nothing else in life so they want to keep programming an elite practice...this is helpful for those who are not inclined to programming. though I see your point, I spend a good amount of time skipping through it, but come on stfu

  • u can use + instead of |

  • not lame tutorial by any means. Thanks for putting these together. I appreciate the level you explained these at - just right for me, I have little java or eclipse background. If you want to program for android you have to learn java, but probably not to the level that java tutorials teach. This great, and staying up till 4 in the morning to make free tutorials for us - wow, just wow.

  • Love the NewBoston, on tutorial 25 you use the ischecked() in the newer version of eclips this is not used .do you know how to get the same result with anything else

  • not lame, pretty good. Why you always do this late at night ? Is this your part time job ?

  • @gnatpat Thank you so much... that cleared that doubt.

  • Why not just do a: input.setInputType(TYPE_TEXT_V­ARIATION_PASSWORD);

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more