This is a migrated thread and some comments may be shown as answers.

Keyboard overlapping over textfield

1 Answer 1165 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paulson
Top achievements
Rank 1
Paulson asked on 01 Oct 2016, 06:47 AM

Hi,

I am having a login page in android app with two fields as specified in image given below.When i click the password field the keyboard gets overlapped in password.Is there a way to move the text field up when the keyboard get opened.

Thanks 

screen shots attached :https://drive.google.com/open?id=0B1u4PKmp8y80bnpneGdzcDZEdDA

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsonev
Telerik team
answered on 03 Oct 2016, 06:21 AM
Hi,

To prevent this problem while  Android soft keyboard hiding input elements, you could set as main container  ScrollView. On tap on some of the field  near the bottom of the app, the selected element will be moved above the virtual keyboard. that for there is an existing plugin that provides this functionality. I am attaching sample code, where has been shown the suggestion.



main-page.xml
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo">
  <StackLayout>
    <ScrollView  id="sv">
        <GridLayout  rows="auto auto auto auto auto auto auto auto auto auto auto auto auto auto auto auto auto">
                 
                <Label text="test" textWrap="true" />
                <TextField id="tf1" onTap="fieldtap" onTap="fieldtap" height="150" row="0" text="Title 1"></TextField>
                <TextField id="tf2" onTap="fieldtap" onTap="fieldtap" height="150" row="1" text="Title 2"></TextField>
                <TextField id="tf3" onTap="fieldtap" height="150" row="2" text="Title 3"></TextField>
                <TextField id="tf4" onTap="fieldtap" height="150" row="3" text="Title 4"></TextField>
                <TextField id="tf5" onTap="fieldtap" height="150" row="4" text="Title 5"></TextField>
                 
            </GridLayout>
    </ScrollView>
  </StackLayout>
</Page>


I hope this 
Regards,
nikolay.tsonev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussion
Asked by
Paulson
Top achievements
Rank 1
Answers by
Nikolay Tsonev
Telerik team
Share this question
or