Default keyboard in application

by Craigbtx » Wed, 05 Jan 2011 03:46:01 GMT


Sponsored Links
 I am real new to android development.

I am using the WebView view to display a webpage inside the android
app

When a user touches a textbox in the web page, can I set the virtual
keyboard that comes up to be a numeric keyboard?

In fact the default keyboard for my whole web app can always be
numeric.

Thanks

Craigbtx


I was hoping to set some property in my code below, like you might do
for a TextView.

Listed below is all my code.

<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"

    >

        <WebView
        android:id="@+id/webview"
        android:layout_width="fill_parent"
        android:layout_height="0dip"
        android:layout_weight="1"

        />


  public class WebViewDemo extends Activity {
    private static final String True = null;

        /** Called when the activity is first created. */

        /** private static final String LOG_TAG = "WebViewDemo";
        private WebView mWebView;
        private Handler mHandler = new Handler();
        */

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        WebView webview = new WebView(this);
        setContentView(webview);

        // Simplest usage: note that an exception will NOT be thrown
        WebSettings webSettings = webview.getSettings();
        webSettings.setJavaScriptEnabled(true);

        // Make the zoom controls visible
        webSettings.setBuiltInZoomControls(true);

        //Open clicked links in this WebView view
        webview.setWebViewClient(new WebViewClient());



        // Go to a web page
        webview.loadUrl(" http://192.168.1.101/PhoneApps/Default.aspx 
    }

}

-- 



Other Threads

1. Good documentation of shapes, styles and themes

Does anyone know of a site with good documentation of android XML
attributes for things like shapes, styles and themes?  The official
site is incomplete and clumsy.
--~--~---------~--~----~------------~-------~--~----~

2. Could you tell me how to change all dp values to px values by default in xml

I got a problem in my app which I programmed in the AVD setting
(hw.lcd density = 160)

now as my client want me to change that LCD setting to (hw.lcd density
= 240)

as I chage that LCD density value, all locations of images and buttons
have changed completely different way that I don't want.

Can anyone help me? plz.

ps. plz don't tell me to change all the values one at a time, I got
more than 30pages of xml file to change that values..

--~--~---------~--~----~------------~-------~--~----~

3. Install on SD

4. hardcoded border in custom title?

5. Android GPS implement

6. Handling Resolutions with the Canvas

7. Anyone else notice more frequent GC in 1.6?