Tamas Koos
Tamas Koos

Reputation: 1063

How to prevent EditText KeyBoard from showing?

I have an edittext and some buttons which write to the edittext. When a start my app, the system keyboard pops up. I want to avoid it, because I don't need that keyboard. How can I do it? Thanks in advance.

Upvotes: 0

Views: 229

Answers (2)

Philipp Jahoda
Philipp Jahoda

Reputation: 51411

To disable the Keyboard for an EditText, use:

EditText.setInputType(EditorInfo.TYPE_NULL);

Upvotes: 2

Brandon
Brandon

Reputation: 27

Use something like this in your AndroidManifest.xml

<activity
    android:name="ActivityName"
    android:windowSoftInputMode="stateHidden" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>

Upvotes: 1

Related Questions