Sunday, January 15, 2017

[Android] Ẩn bàn phím khi start activity (fragment)


Để ẩn bàn phím khi start một activity hoặc add fragment ta làm như sau:
Cách 1: Trong file AndroidManifest.xml add dòng sau vào activity mà bạn muốn

android:windowSoftInputMode="stateHidden"
Cách 2: Trong file giao diện xml thêm dòng sau vào view cha của editext

android:focusable="true"
android:focusableInTouchMode="true"

Done.

5 comments:

  1. A debt of gratitude is in order for sharing. I am trustworthy identical best work from you when you need it at the same time
    best autoketing, Discount master app, Discount master by autoketing

    ReplyDelete
  2. Nice post. I study one thing tougher on completely different blogs everyday.Much thanks for this valuable article.I would like to thank you for the efforts you have made in writing this article. Shopify free shipping bar app shipping bar shopify autoketing

    ReplyDelete

  3. food games 2019 online
    basketball games
    soccer games free
    Nice post. I study one thing tougher on completely different blogs everyday.Much thanks for this valuable article.I would like to thank you for the efforts you have made in writing this

    ReplyDelete
  4. Best wishes! Exactly where are your contact details though? Appreciate this post. Will try it out.Everything is very open with a precise description of the issues. It was definitely informative. Your website is useful. Thanks for sharing!
    friv free online juegos
    2player games for kids
    io jogos 2019

    ReplyDelete
  5. When I have spare time, I often read your posts.Those are what I want to know.I'm thankful if you can upload more posts later. Thanks for your sharing.
    miniclip car games, a10 games for kid, Jogo para menina

    ReplyDelete