简体   繁体   中英

How to keep the soft keyboard from showing up in android 1.6?

I've got an edit text on top of a list view and when I launch this default activity in android 1.6 the soft keyboard always show up by default. If i make focusable false it won't show but then I can't click it. Would a combination of focusable = false, focusableontouch = true resolve this or has anyone else run into this issue?

Note- on Android 2.x this is a non issue when I launch the app

In your AndroidManifest.xml, set this property inside activity tag: android:windowSoftInputMode="stateHidden" .

For example:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="..."
    android:versionCode="..."
    android:versionName="..." >

    <uses-sdk android:minSdkVersion="3" />
    <uses-permission android:name="..."/>

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" android:allowClearUserData="true">
        <activity
            android:label="@string/app_name"
            android:name="..."
            android:windowSoftInputMode="stateHidden" >
...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM