Using the partial screen for displaying, the other part for catching the
touch action without displaying, and then simulating the key event in Key
area.
________________
|                                  |
|                                  |
|                                  |
|  Displaying              |
|                                  |
|                                  |
|                                  |
|_______________|
|        Key                   |
|_______________|

On Tue, Nov 10, 2009 at 8:03 PM, Dianne Hackborn <[email protected]>wrote:

> On Mon, Nov 9, 2009 at 4:42 PM, GT <[email protected]> wrote:
>
>> I am developing apps for an Android device that does not have any
>> hardware keys except for a power button and I have been running into
>> hurdles left and right.  Not having a keyboard is not a big problem
>> but my lack of hardware Home, Menu, and Back keys is killing me.
>>
>
> To be compatible, android devices are required to have menu and back keys.
>  In theory you could provide these some way in software (see for example the
> virtual hard keys on Droid, or you could go further and provide them as a
> dedicated area on the actual screen  that isn't available to applications),
> but in some way there must be a thing that the user can press that generates
> the key code that is there regardless of the application.
>
>
>> By sending a "Go to home screen" intent I can simulate the Home key
>> but I have yet to find a way to have software Back and Menu buttons.
>> Worse yet, even if I did get my keys working I don't see how to make
>> them always available to the user.  There doesn't seem to be a way to
>> keep them accessable from the status bar and I haven't found a way of
>> creating a floating menu that always stays on top of all other
>> activities.
>>
>
> If you don't have any such keys, you'll just need to customize the system
> to create a window or such with the buttons on it, which sends the
> appropriate key event to the window manager.   See the status bar as an
> example of making a dedicated UI like that; see IWindowManager for APIs to
> inject key events into the system.
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
>  --
> unsubscribe: 
> [email protected]<android-porting%[email protected]>
> website: http://groups.google.com/group/android-porting
>

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to