[android-developers] Re: Setting Focus

2009-10-12 Thread Mark
Same problem here, setSelected(false) does nothing, my edit field still insists on having input focus when my app starts up. There must be a way to fix this? On Oct 5, 11:59 am, Tom thomas.coz...@gmail.com wrote: Hi, I'm looking for the same thing. Best regards

[android-developers] Re: Setting Focus

2009-10-12 Thread Mark
For now, I created a dummy LinearLayout and set it to focusable(true), so at least when the activity starts, the first EditText isn't selected: LinearLayout llDummy = new LinearLayout(); llDummy.setFocusable(true); llDummy.setFocusableInTouchMode(true); addView(llDummy); EditText edit

[android-developers] Re: Setting Focus

2009-10-12 Thread Neilz
Hi Mark, thanks for offering a solution to this frustrating problem. I can't implement it though... what's the addView() method from? I can't seem to resolve it... Cheers. On Oct 12, 5:38 pm, Mark mar...@gmail.com wrote: For now, I created a dummy LinearLayout and set it to focusable(true),

[android-developers] Re: Setting Focus

2009-10-12 Thread Mark
Oh the addView() is just from whatever your top level container is. So a default Activity created through the wizard just houses a LinearLayout. So it's like: LinearLayout main = (LinearLayout) findViewById(R.id.mainlayout); LinearLayout dummy = ...; dummy.setFocusable(true);

[android-developers] Re: Setting Focus

2009-10-12 Thread Neilz
Thanks. It doesn't really seem to have worked in my case. It does for the first visit, but strangely on subsequent visits the behaviour is the same as before. As you rightly say though, this has to be simpler...! On Oct 12, 7:52 pm, Mark mar...@gmail.com wrote: Oh the addView() is just from

[android-developers] Re: Setting Focus

2009-10-05 Thread Tom
Hi, I'm looking for the same thing. Best regards --~--~-~--~~~---~--~~ 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