Ray
Ray

Reputation: 31

Soft Keyboard comes over the EditText

I am using Appcelerator's Titanium to develop an Android application. When focus comes over one of the EditText(at lower end of page) the keypad covers the EditText so when I am keying text, I can't see what's being keyed in. What are my options ?

  1. How to move EditText higher on the screen ?
  2. Some applications show "model" form behavior where just that EditText & keyboard shows, any examples of how to do this?

Upvotes: 2

Views: 10263

Answers (3)

sssvrock
sssvrock

Reputation: 569

In my case after struggling came to know that it is depends on your layout alignment

If you are showing the full screen with out status bar ...

The property .. adjust pan or adjust resize won't work to move the edit text up when keyboard showing.. the entire layout including above the views of edit text also moves up

-- the solution is I have removed the option to show the full screen in manifest file and used windows soft input to 'resize' in the manifest file.

Thanks Vinod Sakala

Upvotes: 0

seeppp
seeppp

Reputation: 332

At creation time of a window, add the windowSoftInputMode property.

var win1 = Ti.UI.createWindow({
    // ...
    // add here your other window properties
    // ...
    windowSoftInputMode: Ti.UI.Android.SOFT_INPUT_ADJUST_PAN
});

see Titanium API

Upvotes: -2

Vikas Patidar
Vikas Patidar

Reputation: 43359

Ensure that you have specified the Window Adjustment Mode in your AndroidManifest.xml file for the Activityin which you want to control the SoftKeyboard

Like this:

<activity name="YourActivity"
    android:windowSoftInputMode="stateVisible|adjustResize">
</activity>

or

<activity name="YourActivity"
    android:windowSoftInputMode="stateVisible|adjustPan">
</activity>

Refer this : Enabling resize mode and other window features

Upvotes: 21

Related Questions