You Are Here:

Community: Blogs

Paul Todd's Forum Nokia Blog

Showing the virtual keypad automatically in Queries

Paul.Todd | 10 September, 2009 16:38

As can be seen when a touch device boots after a hard reset or for the first time and the prompt for date and time is done, the input panel is raised and the user does not need o go through touching the control input field to activate the virtual keyboard.

This cuts out an additional keypress for the user and makes it clear that on a touch device the user should click the virtual buttons!

This same affect can be achieved in 5th edition devices by using he EEikDialogFlagVirtualInput in the flags field of a query resource (ie the DIALOG resource control definition)

This format is particularly useful when a single field needs to be ntered in.

Below is the dialog resource which is compatible with both 3rd and 5th edition devices


RESOURCE DIALOG r_text_query
    {
    flags = EGeneralQueryFlags | 0x8000/*| EEikDialogFlagVirtualInput*/;
    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
   
    items =
        {
        DLG_LINE
            {
            type = EAknCtQuery;
            id = EGeneralQuery;
            control = AVKON_DATA_QUERY
                {
                layout = EDataLayout;
                control = EDWIN
                    {
                    flags = EEikEdwinResizable;
                    width = 5;
                    maxlength = 256;
                    max_view_height_in_lines = 5;
                    base_line_delta = 21;
                    };
                };
            }
        };
    }

The effect is illustrated below
On all devices without the EEikDialogFlagVirtualInput set

Normal Query on all devices
and after
Virtual keypad query on touch devices

For extra credit its possible to replace the EEikDialogFlagVirtualInput efine with its hex value (0x8000) and in so doing the same code base can be utilized in both the 3rd and 5th edition devices, just on touch enabled devices the keypad will show automatically.

RSSComments

You must login to post comments. Login
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fblogE2fpaulE2dtoddsE2dforumE2dnokiaE2dblogE2f2009E2f09E2f03E2foviE2dapiE2dbetaE2dsiteE2dupX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZBlogContentQ qdcZtypeQUqfntypeZBlogE45ntryQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fFNE2d1E2fBlogTopicE2fgeneralX qfnZtopicQUqfnTopicZseriesE5f60Q qfnZtypeQUqfntypeZBlogContentQ qfnZtypeQUqfntypeZBlogE45ntryQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxs60X qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZBlogContentQ qrdfZtypeQUqfntypeZBlogE45ntryQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ
User Rating: qfnZuserE5FratingQNx5E2E0000X