[android-developers] EditText without initial keyboard
Does anyone know how to configure an EditText object so that when it is created it does not show the keyboard until I tap on the text field. Right now the keyboard shows up right away on creation. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] EditText without initial keyboard
On Wed, Sep 12, 2012 at 12:51 PM, Ravin wrote: > Does anyone know how to configure an EditText object so that when it is > created it does not show the keyboard until I tap on the text field. Right > now the keyboard shows up right away on creation. Give some other widget the initial focus. The EditText will only display the IME if it has the focus. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] EditText without initial keyboard
Okay thanks - I will try that. btw I have your books and have found them well written and very useful for anyone learning Android development. On Wednesday, September 12, 2012 9:57:49 AM UTC-7, Mark Murphy (a Commons Guy) wrote: > > On Wed, Sep 12, 2012 at 12:51 PM, Ravin > > wrote: > > Does anyone know how to configure an EditText object so that when it is > > created it does not show the keyboard until I tap on the text field. > Right > > now the keyboard shows up right away on creation. > > Give some other widget the initial focus. The EditText will only > display the IME if it has the focus. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > _The Busy Coder's Guide to Android Development_ Version 4.1 Available! > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] EditText without initial keyboard
On Sep 12, 2012, at 7:51 PM, Ravin wrote: > Does anyone know how to configure an EditText object so that when it is > created it does not show the keyboard until I tap on the text field. Right > now the keyboard shows up right away on creation. I've used following code snippet in my application; getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED); setContentView(R.layout.root); In this particular order within onCreate method. This way keyboard stays visible if present during orientation change but is invisible by default. I have to admit I'm not too familiar with soft keyboard and it might be the case this works in my app for other reasons I'm not aware of. -- H -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] EditText without initial keyboard
Okay thanks for that info Harri. I managed to get it to work using the focus method so I did not end up having to investigate your method. On Wednesday, September 12, 2012 10:22:04 AM UTC-7, Harri Smått wrote: > > > On Sep 12, 2012, at 7:51 PM, Ravin > > wrote: > > > Does anyone know how to configure an EditText object so that when it is > created it does not show the keyboard until I tap on the text field. Right > now the keyboard shows up right away on creation. > > I've used following code snippet in my application; > > getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED); > > > setContentView(R.layout.root); > > In this particular order within onCreate method. This way keyboard stays > visible if present during orientation change but is invisible by default. I > have to admit I'm not too familiar with soft keyboard and it might be the > case this works in my app for other reasons I'm not aware of. > > -- > H -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en