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 ?
- How to move EditText higher on the screen ?
- Some applications show "model" form behavior where just that EditText & keyboard shows, any examples of how to do this?
Ensure that you have specified the Window Adjustment Mode
in your AndroidManifest.xml
file for the Activity
in 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
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
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
精彩评论