HTC Desire keyboard problem

by Michael Rueger » Sat, 17 Apr 2010 15:46:35 GMT


Sponsored Links
 Hi all,

a day away from deployment...
Our application which we had tested on a G1 with 1.6 and a Nexus with 
2.1 suddenly has unexpected problems on a HTC desire (German version) 
with 2.1.


It seems that the keyboard behaves differently:

- event.getAction() == KeyEvent.ACTION_UP
doesn't work/fire

- android:imeOptions="actionNext"
doesn't seem to be honored by the keyboard (it keeps the return button)

Unfortunately I don't have access to the phone (a user did some testing) 
so I can't debug.


Any ideas?

Michael

--



HTC Desire keyboard problem

by jamesc » Sun, 18 Apr 2010 21:43:52 GMT


 Hi Michael

It'll be the Sense UI's IME which has different behaviour to the stock
Android IME. Sadly, I'd suggest that you get your hands on a Sense UI-
equipped device (even a Hero, which whilst it has 1.5 on it, may help
you track that issues).

When you say that ACTION_UP doesn't work, is this for all key presses,
or just some in particular?  A bit more information on what you're
attempting to capture with ACTION_UP would be helpful in order to
allow to to get some useful debug prints out.



>


Sponsored Links


HTC Desire keyboard problem

by Michael Rueger » Mon, 19 Apr 2010 16:15:38 GMT


 

Hi Michael It'll be the Sense UI's IME which has different behaviour to the stock Android IME. Sadly, I'd suggest that you get your hands on a Sense UI-
Thanks for the hint, I found this issue for the problem: http://code.google.com/p/android/issues/detail?id=2882& ;q=htc%20ime&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
equipped device (even a Hero, which whilst it has 1.5 on it, may help you track that issues).
I'm afraid so...
When you say that ACTION_UP doesn't work, is this for all key presses, or just some in particular? A bit more information on what you're attempting to capture with ACTION_UP would be helpful in order to allow to to get some useful debug prints out.
See code below, very simple one digit entry fields. (any tips for achieving that more elegantly appreciated :-) ). On the HTC the focus doesn't move to the next field on a key press (the user tells me), so I'm assuming somehow the key event doesn't make it. Michael digit2.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_UP) { if (event.getKeyCode() == KeyEvent.KEYCODE_DEL) { digit1.requestFocus(); } else { digit3.requestFocus(); } } return false; } }); --



HTC Desire keyboard problem

by jamesc » Tue, 20 Apr 2010 04:52:32 GMT


 Perhaps your 'digit2' View doesn't have focus at the point where input
is being requested?






>



HTC Desire keyboard problem

by jamesc » Wed, 21 Apr 2010 13:31:29 GMT


 The solution is that you shouldn't use onKey() but implement an
InputConnection to handle key presses:





HTC Desire keyboard problem

by Michael Rueger » Wed, 21 Apr 2010 14:35:45 GMT


 

The solution is that you shouldn't use onKey() but implement an InputConnection to handle key presses:



Other Threads

1. bindService() does not create local service, but returns true

Examine LogCat and see if you have any warnings.

Also, in case it helps, here is a sample project demonstrating the technique:

http://github.com/commonsguy/cw-android/tree/master/Service/WeatherPlus/




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

_Android Programming Tutorials_ Version 2.9 Available!

-- 

2. VideoView and SlidingDrawer problem

Hi there,

I have a bit of a problem with a SlidingDrawer that I created and that
should go over my VideoView. When the activity is opened for the first
time you can see the slider above the video and when you tap it, it
slides open. However, as soon as you close the slider it seems to
disappear underneath the VideoView and is not visible anymore. It is
still there and when you tap the location where the handle is located
the slidingDrawer reappears, but I would rather prefer if it wasn't
hiding all the time ;)

If anyone knows what I can do about that and help me out, that would
be really fantastic because I have been trying for hours now and I
have no idea what I should do. I also haven't found a similar issue or
a solution for that.

Thank you in advance.

This here is the xml code for the videoview and the slidingDrawer:


<?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"
                        android:background="@drawable/shape_background_gradient"
                              >

                <VideoView
                        android:layout_width="240px"
                        android:layout_height="180px"
                        android:id ="@+id/VideoViewEdit"
                        android:layout_centerHorizontal="true"
                        >
                </VideoView>
                <ScrollView
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:layout_below="@id/VideoViewEdit">
                        <TableLayout
                                        android:layout_width="fill_parent"
                                        android:layout_height="fill_parent"
                                        android:stretchColumns="0">
                                <TableRow
                                                
android:background="@drawable/shape_track_background"
                                                android:padding="5px"
                                                >
                                        <ImageView 
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/ic_editor_videotrack"
                                                           android:padding="5px"
                                                           
android:layout_gravity="left"/>

                                </TableRow>
                                <TableRow
                                                
android:background="@drawable/shape_track_background"
                                                android:padding="5px"
                                                >
                                                <ImageView 
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/ic_editor_audiotrack"
                                                           android:padding="5px"
                                                           
android:layout_gravity="left"/>


                                </TableRow>
                                <TableRow
                                                
android:background="@drawable/shape_track_background"
                                                android:padding="5px"
                                                >
                                        <ImageButton 
android:layout_width="wrap_content"
                                                           
android:layout_height="wrap_content"
                                                           
android:src="@drawable/ic_editor_add_media"
                                                           android:padding="5px"
                                                           
android:layout_gravity="left"
                                                           />
                                </TableRow>
                        </TableLayout>
                </ScrollView>
 <SlidingDrawer
     android:id="@+id/drawer"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
         android:orientation="horizontal"
     android:handle="@+id/handle"
     android:content="@+id/content">

     <ImageView
         android:id="@id/handle"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:src="@drawable/slider_handle"
         />

     <LinearLayout
         android:id="@id/content"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:orientation="vertical">
        <ImageButton
                android:id="@+id/button_exposure"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_exposure"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
        <ImageButton
                android:id="@+id/button_properties"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_properties"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
        <ImageButton
                android:id="@+id/button_special_effects"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_special_effects"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
                <ImageButton
                android:id="@+id/button_test1"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_exposure"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
        <ImageButton
                android:id="@+id/button_test2"
                android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="#77000000"
                        android:src="@drawable/ic_slider_exposure"
                        android:padding="5px"
                        android:layout_marginBottom="1px"
                        android:layout_gravity="left"/>
     </LinearLayout>
     <ViewStub
        android:id="@+id/stub"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#77000000">
     </ViewStub>
 </SlidingDrawer>
</RelativeLayout>

-- 

3. My column '_id' does not exist?

4. facebook sdk

5. Emulate android preference category look and feel

6. how to froyo on galaxy s + root and benchmark vs. Froyo EV

7. How to execute shell script file from android application