0

I'm building an app with Appcelerator (for Android system). I'm building a View with some TextField, Label etc.

Now if I try to click on one of these TextField, (correctly) I can see the Keyboard of the smartphone. If I try to click of the end of this TextField, I can see the Keyboard but it hides the TextField and I can't see the text that I digit.

This is the code

<Window id="registry_edit_window" onClose="cleanup">
    
    
    <View id="outer_container">
        
        <View id="close_button">
                <!-- <Label id="close_button_label" text="X" />  -->
                <ImageView id="close_icon" image="/images/new_icons/close_icon_white.png"></ImageView>
        </View> <!-- end close_button -->
        
        
        
        <View class="inner_container">
        
        
            <!-- title -->
            <Label id="title" />
            
        
        
            <ScrollView id="scrollForm">
                
                    <View id="name_row" class="row_item">
                        <Label id="name_label" class="label" text="" />
                        <TextField id="name_field" class="field" />
                    </View>
                    
                    <View id="surname_row" class="row_item">
                    <Label id="surname_label" class="label" text="" />
                    <TextField id="surname_field" class="field" />
                </View>
                
                <View id="birthdate_row" class="row_item">
                    <Label id="birthdate_label" class="label" text="" />
                    <TextField id="birthdate_field" class="field" editable="false" />
                </View>
                
                <View id="address_row" class="row_item">
                    <Label id="address_label" class="label" text="" />                  
                    <TextField id="address_field" class="field" />
                </View>
                
                <View id="country_row" class="row_item">
                    <Label id="country_label" class="label" text="" />                  
                    <TextField id="country_field" class="field" />
                </View>
                
                <View id="phone_row" class="row_item">
                    <Label id="phone_label" class="label" text="" />            
                    <TextField id="phone_field" class="field" />
                </View>
                
                <View id="phone_emergency_row" class="row_item">
                    <Label id="phone_emergency_label" class="label" text="" />              
                    <TextField id="phone_emergency_field" class="field" />
                </View>
                
                <View id="notes_row" class="row_item" height="Titanium.UI.SIZE">
                    <Label id="notes_label" class="label" text="" />                
                    <TextArea id="notes_area" class="text_area" />
                </View>
            </ScrollView>
            
        
            
            <View id="buttons_section">
                
                <View id="save_button" class="custom_button">
                    <ImageView id="save_icon" image="/images/new_icons/save_icon_white.png" class="button_icon"></ImageView>
                    <Label id="save_label" class="custom_button_label" text=""></Label>
                </View>
                
            </View>
        
        
    </View> <!-- end inner_container -->
    </View> <!-- end outer_container -->
</Window>

how can I fixed it?

enter image description here

As you can see, in this first picture, I can see any TextField.

enter image description here

As you can see, I have click on the last of TextField but I can't see it.

Community
  • 1
  • 1
bircastri
  • 2,169
  • 13
  • 50
  • 119

1 Answers1

0

apply the soft input adjust pan on your android window, you can even do this globally through the app.tss file

"Window[platform=android]": {
    windowSoftInputMode: Titanium.UI.Android.SOFT_INPUT_ADJUST_PAN
}
TheFuquan
  • 1,737
  • 16
  • 18
  • I have use your code in my app.tss file but this code not fixed my problem – bircastri Feb 02 '17 at 09:55
  • check this out : http://stackoverflow.com/questions/17410499/difference-between-adjustresize-and-adjustpan-in-android – TheFuquan Feb 02 '17 at 10:39
  • I don't have found a solution. To fixed my Problem, I have insert a global View under ScrollView so I have set the height of this global view as "200%" so I can scroll di view if I have the Keyboard open. – bircastri Feb 03 '17 at 11:07
  • If you can create a gist with a full controller js xml and tss files, i'll try to give it a look indepth – TheFuquan Feb 03 '17 at 20:33