简体   繁体   English

滚动视图到最后一个条目

[英]Scroll the view upto last entry

I am doing an app in which i have to submit data having 8 entries one by one in a stack. 我正在做一个应用程序,其中我必须提交一个堆栈中有8个条目的数据。 I used the scrollview.But when the user clicks on first entry the keypad will appear and screen scrolls.Then the user can see the second entry and fill the data. 我使用的是滚动视图,但是当用户单击第一个条目时,将出现小键盘并滚动屏幕,然后用户可以看到第二个条目并填充数据。

But after coming to fourth entry or fifth entry the scrolls gets stopped.As a result the user cannot see the the next entry without closing the keypad. 但是进入第四项或第五项后,滚动将停止,因此用户在不关闭键盘的情况下无法看到下一项。

Can anyone please give a solution to my problem.I tried adding the scrollview to the entire screen also. 任何人都可以解决我的问题。我也尝试将scrollview添加到整个屏幕。

Thanks in Advance. 提前致谢。

Here is my code: 这是我的代码:

    <ScrollView>
    <StackLayout>
      <Entry PlaceHolder="First Name"/>
      <Entry PlaceHolder="Last Name"/>
      <Entry PlaceHolder="Email"/>
      <Entry PlaceHolder="Mobile Number"/>
      <Label Text="Address" FontSize="15"/>
      <Entry PlaceHolder="House Number"/>
      <Entry PlaceHolder="Street"/>
      <Entry PlaceHolder="City"/>
      <Entry PlaceHolder="Street"/>
      <Entry PlaceHolder="State"/>
      <Entry PlaceHolder="Country"/>
      <Button Text="Submit"/>
    </StackLayout>
  </ScrollView>

But after coming to fourth entry or fifth entry the scrolls gets stopped.As a result the user cannot see the the next entry without closing the keypad. 但是进入第四项或第五项后,滚动将停止,因此用户在不关闭键盘的情况下无法看到下一项。

Please try using WindowSoftInputMode = SoftInput.AdjustResize for your Activity's setting: 请尝试将WindowSoftInputMode = SoftInput.AdjustResize用于您的Activity设置:

Example: 例:

[Activity(Label = "Demo", MainLauncher = true,WindowSoftInputMode =SoftInput.AdjustResize)]
public class MainActivity : Activity
{
    ...
}

For details please refer to Specify How Your UI Should Respond session of Handling Input Method Visiblity 有关详细信息,请参阅Specify How Your UI Should Respond 处理输入法可见性的会话。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM