Hello,
If i explicit change "WindowSoftInputMode" to the "AdjustResize" in Android, it stops working(keyboard overlaps entries under itself). You can reproduce it so you tap on last entry in the view and keyboard will open but entry will not scroll above the keyboard.
It I use Xamarin.Forms.CollectionView instead of SfListView , it works properly. I created sample app which is attached.
Device: Samsung Galaxy Tab S6 Lite Android 11
Thanks
Lukas
Attachment: SfListViewKeyboard_e7bd1919.zip
Hi Lukas,
When using WindowSoftInputModeAdjust as Resize, the layout will be resized, and we got the resized size in our layout calls from the framework. So, the view cannot be scrolled further with the new size. This is the expected behavior when using Resize in SfListView.
Hence, we suggest you use the WindowSoftInputModeAdjust as Pan to achieve your requirement.
You can also refer to the following documentation regarding the same,
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/platform/android/soft-keyboard-input-mode
Please let us know if you need further assistance.
Lakshmi Natarajan
Hello Lakshmi
Thanks for your response, but we need this mode in our application because we have elements in the page header that customers can interact with and don't accept one extra click. And on the other hand, collectionView works in both modes.
Hi Lukas,
You can resolve the reported scenario by loading SfListView with full height. Please load the SfListView inside the ScrollView and set IsScrollingEnabled with value False as like below code snippet.
Code snippet:
|
<ContentPage.Content> <ScrollView> <xForms:SfListView SelectionMode="None" IsScrollingEnabled="False" x:Name="_sfListView"> <xForms:SfListView.ItemTemplate> <DataTemplate> <Entry VerticalOptions="End" HorizontalOptions="Center" WidthRequest="200"></Entry> </DataTemplate> </xForms:SfListView.ItemTemplate> </xForms:SfListView> </ScrollView> </ContentPage.Content> |
Please refer our user guidelines documentation regarding loading SfListView with full height.
UG link: https://help.syncfusion.com/xamarin/listview/scrolling#listview-with-full-height
We have attached a modified sample for you reference. Please have a look at this sample and let us know if you need any further assistance.
Regards,
Suja
Hello Suja,
Thanks also for your answer, but this is not acceptable for us because if I put SfListView in ScrollView, I would kill virtualization. Is there any other way I can fix this with virtualization turned on?
Hi Lukas,
We have checked the alternative approaches to meeting your requirements. Unfortunately, using WindowSoftInputModeAdjust as Pan or the Xamarin.Forms ScrollView is the best solution for the reported scenario. We recommend that you use any of the solutions listed above to meet your needs.
Also, as we mentioned in our previous update, the view size will be resized when using WindowSoftInputModeAdjust as Resize, so the ListView will not scroll in this scenario. The CollectionView and SfListView architectures were different, so we couldn't compare the two controls in this scenario.
Please let us know if you have any concerns.
Lakshmi Natarajan