开发者

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

开发者 https://www.devze.com 2023-03-14 20:29 出处:网络
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 sh

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" >
...
0

精彩评论

暂无评论...
验证码 换一张
取 消