scrollview 相关问题

请务必使用**平台特定的**标签。仅将此标记用于有关所有平台上滚动视图的最常见问题。滚动视图是用户可以在包含区域内滚动的视图。所有现代用户体验的基础之一。

在多个列上滚动查看器(StackPanel)

我正在尝试构建类似的东西: 我尝试定义一个包含 3 列的网格(第一列用于文本,最后两列用于 每行中的按钮。 所以在网格内我有一个滚动查看器和......

回答 1 投票 0

ScrollView 中的 FlatList 错误“VirtualizedLists 永远不应嵌套在具有相同方向的普通 ScrollView 中”

我在其中制作了一个组件EventCards,我使用Flatlist。我在 Home 组件中调用该组件,其中 EventCards 组件位于 ScrollView 中。 常量主页= () => { 返回 ( 其他组件...

回答 1 投票 0

React Native:通过 ScrollView 将触摸事件传递到 z 平面下方的元素

我正在尝试编写一个视差元素,该元素具有多个以不同速率滚动的窗格。 为了实现这一点,我有多个视图绝对定位并堆叠在 z 平面上,并带有 Scroll...

回答 2 投票 0

ScrollViewReader ScrollTo 不工作

我正在创建一个水平菜单,并使用水平 ScrollView 和 HStack 来查看其项目。一切似乎都正常,但我的 ScrollViewReader 有问题.. 正如你应该从代码中看到的那样......

回答 1 投票 0

如何在 Flutter 中通过滚动来展开小部件

我想制作一个像附加照片一样的小部件。 根据我的搜索,我必须使用CustomScrollView、SliverAppBar。 我认为这个小部件必须领先于背景小部件。所以,我必须使用堆栈吗?

回答 1 投票 0

SwiftUI ScrollView 无法向下滚动到 ZStack 的所有内容

SwiftUI ScrollView 无法全部向下滚动到包含的 ZStack 的所有内容。 结构 TestView: 查看 { var 颜色:[颜色] = [.red, .orange, .yellow, .green, .mint, .teal, .cyan, .blue, .i...

回答 1 投票 0

ScrollView + NavigationView 动画故障 SwiftUI

我有一个简单的观点: var body: 一些视图 { 导航视图{ 滚动视图{ 虚拟堆栈{ 对于每个(0..<2) { _ in CardVew...

回答 5 投票 0

React Native 在键盘出现/隐藏时启用/禁用 ScrollView

我想在键盘隐藏时禁用滚动并在键盘出现时启用。 任何帮助将不胜感激。先感谢您。 React Native 版本:0.50.3

回答 2 投票 0

如何在 SwiftUI 中禁用 ScrollView 弹跳

有任何修饰符可以阻止 swiftUI 中 ScrollView 的弹跳吗? 结构 RoomDetailsView: 查看 { var body: 一些视图 { ScrollView(showsIndicators: false) { 图像(“测试”) ...

回答 7 投票 0

如何在 SwiftUI ScrollView 中以编程方式检测滚动方向

我想像Safari一样通过滚动方向显示或隐藏项目。向上滚动时隐藏某些内容,向下滚动时显示它。

回答 6 投票 0

React-Native - availableHeight 不确定,因此 heightMeasureMode 必须为 YGMesureModeUndefined

我收到此错误 这是我的代码 我收到此错误 这是我的代码 <ImageBackground source={BG} style={{ flex: 1 }}> <ScrollView horizontal style={{ flex: 1, height: '100%' }}> <View style={{ paddingTop: '10%' }}> <Text style={[styles.bold, styles.textCenter, { fontSize: 18, color: c.yellow }]}>Data</Text> <View style={[styles.row, styles.justifyBetween, { width: '100%', paddingHorizontal: '5%', borderTopWidth: 1, borderBottomWidth: 1, borderColor: c.yellow }]}> <Text style={[styles.textWhite, { width: '10%' }]}>Sr.</Text> <Text style={[styles.textWhite, { width: '20%' }]}>User ID</Text> <Text style={[styles.textWhite, { width: '20%' }]}>Name</Text> <Text style={[styles.textWhite, { width: '25%' }]}>Phone</Text> <Text style={[styles.textWhite, styles.textCenter, { width: '20%' }]}>Active</Text> <Text style={[styles.textWhite, { width: '25%' }]}>Time/Date</Text> </View> </View> {loading ? <ActivityIndicator color={c.yellow} size='large' style={{ marginTop: '20%' }} /> : data.length > 0 ? <FlatList data={data} keyExtractor={(item, index) => index.id} renderItem={dataList} style={{ width: '100%', paddingHorizontal: '1%', marginTop: '5%' }} /> : <Text style={[styles.textWhite, styles.textCenter, styles.bold, { fontSize: 20, marginTop: '20%' }]}>No Data Found!</Text> } </ScrollView> </ImageBackground> 我的RN版本是0.70.6 我正在使用 Ubuntu 22.04 LTS 我在物理设备上而不是模拟器上运行此应用程序 NodeJS 版本 16.18.1 JDK信息 - openjdk 11.0.17 2022-10-18 Android Studio 海豚 2021.3.1 这是我的依赖者 "@react-native-async-storage/async-storage": "^1.17.11", "@react-native-community/blur": "^4.3.0", "@react-native-community/clipboard": "^1.5.1", "@react-native-masked-view/masked-view": "^0.2.8", "@react-native-picker/picker": "^2.4.8", "@react-navigation/native": "^6.0.13", "@react-navigation/stack": "^6.3.4", "@reduxjs/toolkit": "^1.9.0", "axios": "0.27", "react": "18.1.0", "react-native": "0.70.6", "react-native-elements": "^3.4.2", "react-native-gesture-handler": "^2.8.0", "react-native-image-crop-picker": "^0.38.1", "react-native-paper": "^4.12.5", "react-native-qrcode-svg": "^6.1.2", "react-native-reanimated": "^2.13.0", "react-native-safe-area-context": "^4.4.1", "react-native-screens": "^3.18.2", "react-native-splash-screen": "^3.3.0", "react-native-svg": "^13.6.0", "react-native-vector-icons": "^9.2.0", "react-redux": "^8.0.5" 我已经搜索了“错误”,但一无所获。答案说这个错误是在 RN v0.56 中退出的。 我想在 Horizontal ScrollView 中使用 Vertical Flatlist 不得在 ScrollVeiw 子项或平面列表项中使用百分比值 <ImageBackground source={BG} style={{ flex: 1 }}> <ScrollView horizontal style={{ flex: 1, height: '100%' }}> <View style={{ paddingTop: 70 }}>//not paddingTop:10% 从来没想过这一点,但它确实有效。太棒了!!!

回答 2 投票 0

在 MAUI[Android] 中,Scrollview 在 maui.community.toolkit.popup 中不起作用

我在内容页面尝试了相同的布局,它有效。它不仅仅在弹出窗口中起作用。 下面是我的 XAML 代码结构。 我在内容页面尝试了相同的布局,它有效。它不仅仅在弹出窗口中工作。 下面是我的XAML代码结构。 <toolkit:Popup x:Class="MuniLogicMobile.View.ReportsPage" xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" x:Name="popup" Color="Transparent"> <Border Grid.Column="1" Stroke="{x:StaticResource Secondary}" StrokeThickness="2"> <Border.StrokeShape> <RoundRectangle CornerRadius="10" /> </Border.StrokeShape> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <ScrollView Margin="10" HeightRequest="500" VerticalOptions="FillAndExpand"> <VerticalStackLayout Margin="10"> </VerticalStackLayout> </ScrollView> </Grid> </Border> </toolkit:Popup> 只需添加上面的布局并在弹出窗口中尝试。在 VerticalStackLayout 中添加更多项目。 我在Android平台遇到这个问题,没有在iOS中尝试过。 尝试设置滚动视图的高度,并且 将 HosrizontalOptions 和 VerticalOptions 设置为 Fill 两者单独或一起都不起作用。 我这边做了测试,但无法重现这个问题。我在 Android 模拟器(Pixel 5-Api 3)上进行了测试。 请参考我使用的以下代码,在我这边可以正常运行。 <?xml version="1.0" encoding="utf-8" ?> <toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" x:Class="PopUpMauiApp.MyPopPage" > <Border Grid.Column="1" Stroke="#C49B33" StrokeThickness="2"> <Border.StrokeShape> <RoundRectangle CornerRadius="10" /> </Border.StrokeShape> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <ScrollView Margin="10" HeightRequest="500" VerticalOptions="FillAndExpand"> <VerticalStackLayout Margin="10"> <Label TextColor="Red" Text="1 FOR the most wild, yet most homely narrative which I am about to pen, I neither expect nor solicit belief. Mad indeed would I be to expect it, in a case where my very senses reject their own evidence. Yet, mad am I not -- and very surely do I not dream. But to-morrow I die, and to-day I would unburthen my soul. My immediate purpose is to place before the world, plainly, succinctly, and without comment, a series of mere household events. In their consequences, these events have terrified -- have tortured -- have destroyed me. Yet I will not attempt to expound them. To me, they have presented little but Horror -- to many they will seem less terrible than barroques. Hereafter, perhaps, some intellect may be found which will reduce my phantasm to the common-place -- some intellect more calm, more logical, and far less excitable than my own, which will perceive, in the circumstances I detail with awe, nothing more than an ordinary succession of very natural causes and effects." /> <Label TextColor="Green" Text="2 FOR the most wild, yet most homely narrative which I am about to pen, I neither expect nor solicit belief. Mad indeed would I be to expect it, in a case where my very senses reject their own evidence. Yet, mad am I not -- and very surely do I not dream. But to-morrow I die, and to-day I would unburthen my soul. My immediate purpose is to place before the world, plainly, succinctly, and without comment, a series of mere household events. In their consequences, these events have terrified -- have tortured -- have destroyed me. Yet I will not attempt to expound them. To me, they have presented little but Horror -- to many they will seem less terrible than barroques. Hereafter, perhaps, some intellect may be found which will reduce my phantasm to the common-place -- some intellect more calm, more logical, and far less excitable than my own, which will perceive, in the circumstances I detail with awe, nothing more than an ordinary succession of very natural causes and effects." /> </VerticalStackLayout> </ScrollView> </Grid> </Border> </toolkit:Popup> 注: 请确保您的 nuget 使用最新版本。

回答 1 投票 0

Scrollview 在 python kivy 应用程序中不起作用

我的应用程序中需要如此多的按钮和行,我需要在其他程序中滚动条和滚动视图滚动正在工作,但在这个程序中它不起作用 从 kivy.app 导入 App 来自 kivy.uix.label 我...

回答 1 投票 0

ScrollViewReader 滚动在 iOS 15 上滚动太多

在iOS 15上,ScrollViewReader的scrollTo存在问题,滚动太多。 我有一个按钮和一个日期选择器,点击按钮时我会显示日期选择器,但我想确保...

回答 1 投票 0

(水平)ScrollView 还是 RecyclerView 在这种情况下?

我有一个复杂对象的列表。每个对象都有大量信息,这些信息不断从后端网络服务器更新。我预计通常会处理 50-100 个这样的对象。 现在,每个对象...

回答 1 投票 0

SwiftUI:通过 View.scrollPosition(id:anchor:) 观察滚动位置会中断滚动

我正在尝试使用新的(在 WWDC 2023 上宣布并在 iOS 17 和 macOS 14 中可用)API 来观察 SwiftUI ScrollView 的滚动位置。 我有以下观点,但我无法使其工作...

回答 1 投票 0

为什么在 ScrollView 上的可刷新修饰符中取消异步任务(iOS 16)

我正在尝试在面向 iOS 16 的应用程序中的 Scrollview 上使用可刷新修饰符。但是,异步任务在拉动刷新手势期间被取消。 这是一些代码和攻击...

回答 5 投票 0

SwiftUI 在 ScrollView 中自动滚动到底部(底部优先)

我的问题是我(在 SwiftUI 中)有一个带有 foreach 的 ScrollView 。知道 foreach 何时加载我的所有条目,我希望最后一个条目成为焦点。 我做了一些谷歌研究,但我...

回答 8 投票 0

SwiftUI 分页滚动视图问题

我正在尝试为滚动视图创建动画以将新页面重叠在图像上。图像将覆盖大部分屏幕,并且不应移动,文本应在其上滑动。 动画...

回答 1 投票 0

如何使我的表单在键盘输入时可滚动

我在Flutter中设计了一个表单。我想让它在键盘打开时可滚动,以便用户可以填写隐藏在键盘下方的字段。这是相同的屏幕截图: 我

回答 4 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.