Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6236909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:55:53+00:00 2026-05-24T10:55:53+00:00

When a View loaded, I want to force SIP to open and show Keyboard

  • 0

When a View loaded, I want to force SIP to open and show Keyboard with numbers. Also, I want a editText view accepts Letter and Number input from SIP

XML
            <EditText android:id="@+id/search_bus_by_num_keyword"
            android:layout_height="wrap_content" android:layout_width="fill_parent"
            android:lines="1" android:layout_weight="1"
            android:inputType="numberDecimal"
            />

Code
    editTextSearchKeyword = (EditText) context.findViewById(R.id.search_bus_by_num_keyword);
    editTextSearchKeyword.setOnKeyListener(new OnKeyListener() {
        @Override
        public boolean onKey(View v, int keyCode, KeyEvent event) 
        {
            // If the event is a key-down event on the "enter" button
            if ((event.getAction() == KeyEvent.ACTION_DOWN) &&
                    (keyCode == KeyEvent.KEYCODE_ENTER)) {
                // Perform action on key press
                context.hideSIP(editTextSearchKeyword);
                searchRoute();
                return true;
            }
            return false;
        }
    });
    editTextSearchKeyword.setText(searchKeyword);

    editTextSearchKeyword.requestFocus();
    InputMethodManager mgr = (InputMethodManager) context.getSystemService(context.INPUT_METHOD_SERVICE);
    mgr.showSoftInput(editTextSearchKeyword, InputMethodManager.SHOW_FORCED);

When the View loaded:
http://pwong.name/sip_01.png

When I change the SIP from Number to Letter:
http://pwong.name/sip_02.png , I cannot enter Letter to the editText view.

Is it possible to enter both of number and letter for a editText if I set android:inputType=”numberDecimal” to it? Is it possible to change android:inputType at run time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:55:53+00:00Added an answer on May 24, 2026 at 10:55 am

    See this question about how to change the InputType in code. See this link for the EditText input types. As far as your requirements of “I want to force SIP to open and show Keyboard with numbers. Also, I want a editText view accepts Letter and Number input from SIP” – I do not understand. I do not think you can have multiple modes of input for an EditText.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The tree-view is loaded with some data from a DB. I want to filter
i want to scroll text automatically when my view gets loaded and that should
I want to use Telerik DatePickers and IntegerTextBoxes on my Partial View loaded via
I want to change style references inside head tag when partial view is loaded
i want update my core data database when the view is just loaded on
Is it possible to set self.navigationItem.title = @MyTitle; after the view has loaded ?
I have a view that is loaded in the MainWindow.xib. It is just a
I am trying to save my data from a view that was loaded on
I have a View / ViewModel where a ProductList is loaded. This list is
The ActiveScaffold list view has a search form that is loaded via ajax when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.