英文:
.NET MAUI Soft keyboard wipes out half the page on android why?
问题
当软键盘弹出时,它会像在Android 13上那样擦掉页面的一半。键盘擦掉了页面的一半
我希望键盘可以弹出和收回而不影响页面。我尝试了在键盘弹出时隐藏我的collectionView,并在键盘收回时取消隐藏它,但效果不太好。只有在某种方式重新加载时才能修复,比如当我将被擦掉的部分滚出视图,然后再滚回来。
**更新:问题是collectionView的ItemsLayout设置为“HorizontalList”,而我的项目使用的是.NET 6(默认的ItemsLayout是VerticalList,没有问题)。但我将我的项目升级到.NET 7,方法是在我的项目的csproj文件中将所有对.NET 6的引用更改为.NET 7。希望对将来的某人有所帮助!
英文:
when soft keyboard pops up, it wipes out half the page like so on android 13. Keyboard wipes out half the page
i expect the keyboard to pop up and down without affecting the page . I've tried hiding my collectionView when keyboard pops up and Unhide it when keyboard goes down but it doesn't work very well. it only gets fixed when somehow it gets reloaded, like if i scroll the wiped section out of view and i scroll it back in
**UPDATE the problem was collectionView's ItemsLayout="HorizontalList" and my project was on .net6 (didnt have any issues with the default ItemsLayout default which is VerticalList) but i upgraded my project to .net7 by going into csproj file in my project changing any reference to net6 with net7
hope it helps someone in the future!
答案1
得分: 1
问题出在我的帖子中已经解释过了:
问题出在collectionView的ItemsLayout="HorizontalList",而我的项目是在.net6上(默认的ItemsLayout是VerticalList,没有任何问题)。
我通过将项目升级到.net7来解决这个问题,方法是进入我的项目中的csproj文件,并将所有引用net6的地方改成net7。
希望对将来的某人有所帮助!
英文:
As i've explained in my post :
The problem was collectionView's ItemsLayout="HorizontalList" and my project was on .net6 (didnt have any issues with the default ItemsLayout default which is VerticalList).
I fixed this by upgrading my project to .net7, by going into csproj file in my project changing any reference to net6 with net7.
Hope it helps someone in the future!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论