MAUI Shell 从侧面移除 OverScroll

问题描述 投票:0回答:2

我一直在开发我的应用程序。当我想滑动该项目以将其删除时,它正在使用

SwipeView
,十次中有九次 - 我得到这个(正如我所说的)ScrollPreview(我不知道它实际上是如何调用的)。这个蓝色东西的来源好像来自
Shell
(
AppShell
)。

有什么办法可以去掉吗?

编辑: 经过进一步调查,它似乎与

ShellContent
有关。如果基础结构不是基于
OverScroll
,则
ShellContent
(Gerald Versluis 在评论中指出的名称)不会出现。

xamarin xamarin.forms maui .net-maui
2个回答
0
投票

我的解决方案可能不是最好的,但它有效。我在Android平台的colors.xml中将colorPrimary设置为透明。

<resources>
   <color name="colorPrimary">@color/mtrl_btn_transparent_bg_color</color>
</resources>

-1
投票

斯威基!如果您不介意在整个应用程序中禁用滚动发光效果,则在

res/values/styles.xml
中添加此样式将是最简单的解决方案:

<style name="AppTheme" parent="AppBaseTheme">
    <item name="android:overScrollMode">never</item>
</style>

或者您可以在布局文件中选择退出单个布局:

<MyCustomView android:overScrollMode="never"> ... </MyCustomView>
    
© www.soinside.com 2019 - 2024. All rights reserved.