Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Soft Keyboard appears when entering on an Activity
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
fr4gus  
View profile  
 More options Jul 4 2011, 4:35 pm
From: fr4gus <fggar...@gmail.com>
Date: Mon, 4 Jul 2011 13:35:49 -0700 (PDT)
Local: Mon, Jul 4 2011 4:35 pm
Subject: Soft Keyboard appears when entering on an Activity
I'm able to replicate a unusual issue with EditText. But it doesn't
happen on all devices.

Let's say you have the following layout:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:layout_width="fill_parent"
android:layout_height="fill_parent">
   <!-- ScrollView, GridView, etc also causes this. -->
    <ListView
        android:id="@+id/listView1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"></ListView>
    <EditText
        android:id="@+id/editText1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:text="EditText"></EditText>
</RelativeLayout>

When your activity is created and displayed the first time,
softKeyboard will be shown even if user doesn't select the EditText
field.

I haven't reported this issue on Android trouble ticket system, since
I think this is an issue on manufacturer implementation (may be)

Devices we have:
Sonyericsson Xperia x10 (with Cyanogen 6) - Issue doesn't appear.
Motorola Milestone - Issue doesn't appear.
HTC Desire - Issue happens on it.
LG GX2 (T-Mobile) - Issue happens on it.

The recipe to replicate this seems to be, having a "ViewGroup" above
any EditText, will cause in certain devices, soft keyboard to appear,
when entering on an Activity.

I just would like to know if other ppl is able to replicate it, on
which devices, and if possible, what's the workaround.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Murphy  
View profile  
 More options Jul 4 2011, 4:45 pm
From: Mark Murphy <mmur...@commonsware.com>
Date: Mon, 4 Jul 2011 16:45:19 -0400
Local: Mon, Jul 4 2011 4:45 pm
Subject: Re: [android-developers] Soft Keyboard appears when entering on an Activity
You might consider posting a full sample project somewhere, to make it
easier for others to test.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jamesc  
View profile  
 More options Jul 5 2011, 3:22 am
From: jamesc <jame...@gmail.com>
Date: Tue, 5 Jul 2011 00:22:25 -0700 (PDT)
Local: Tues, Jul 5 2011 3:22 am
Subject: Re: Soft Keyboard appears when entering on an Activity
Add stateHidden to the activity's manifest entry under
windowSoftInputMode.

On Jul 4, 9:35 pm, fr4gus <fggar...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
authorwjf  
View profile  
 More options Jul 5 2011, 8:06 am
From: authorwjf <wfran...@softlayer.com>
Date: Tue, 5 Jul 2011 05:06:32 -0700 (PDT)
Local: Tues, Jul 5 2011 8:06 am
Subject: Re: Soft Keyboard appears when entering on an Activity
I had similar issues and with some testing found that adding:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_AL WAYS_HIDDEN);
as the last line of my onCreate() in each class that extends Activity
did the trick.  Like you the issue with the soft keyboard popping up
did not seem to affect every phone in my test arsenal but adding the
line above has worked as a universal fix without any unwanted side
affects that I'm aware of.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
authorwjf  
View profile  
 More options Jul 5 2011, 8:09 am
From: authorwjf <wfran...@softlayer.com>
Date: Tue, 5 Jul 2011 05:09:57 -0700 (PDT)
Local: Tues, Jul 5 2011 8:09 am
Subject: Re: Soft Keyboard appears when entering on an Activity
I encountered a similar problem and found with some testing that
adding:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_AL WAYS_HIDDEN);
as the last line of the onCreate() for each class that extends
Activity did the trick.  P.S. I apologize in advance if this post
shows up twice.  My browser died last time when I hit submit :)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fr4gus  
View profile  
 More options Jul 5 2011, 4:47 pm
From: fr4gus <fggar...@gmail.com>
Date: Tue, 5 Jul 2011 13:47:15 -0700 (PDT)
Local: Tues, Jul 5 2011 4:47 pm
Subject: Re: Soft Keyboard appears when entering on an Activity
Thank you all,

and setting windowSoftInputModem stateHidden solves the problem. I'm
still wondering why we should explicitly set this value, is this a
bug?

Kind regards,

-f4

On Jul 4, 2:35 pm, fr4gus <fggar...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fr4gus  
View profile  
 More options Jul 28 2011, 1:40 pm
From: fr4gus <fggar...@gmail.com>
Date: Thu, 28 Jul 2011 10:40:59 -0700 (PDT)
Local: Thurs, Jul 28 2011 1:40 pm
Subject: Re: Soft Keyboard appears when entering on an Activity
There you go, https://github.com/fr4gus/AndroidSoftKeyboardBug

I uploaded a really simple project, in case someone wants to test it
on their devices :D

-f4

On Jul 5, 2:47 pm, fr4gus <fggar...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »