标签: horizontal-scrolling

如何在Android中创建类似于视图的架子?

如何在android中创建一个类似于视图的架子,在任何行中显示几本书?此外,它应具有水平和垂直功能,如月亮+阅读器应用程序.

我可以写一个水平移动的架子视图,但它不能完全发挥作用.我使用xml文件来查看包含图像,文本和按钮的项目.我写了一个类,扩展AdapterView为创建ListView我调用的自定义"shelf view".不幸的是,我的程序显示了一行,我不能将它用于多行.

在此输入图像描述

android listview horizontal-scrolling vertical-scrolling

16
推荐指数
1
解决办法
9875
查看次数

在jscrollpane中禁用水平滚动

我有一个JScrollPaneFlowLayout我希望有一个固定的宽度.它应该只是垂直滚动,当我调整窗口大小时应该自动重新排列内容.我认为应该有一种方法,setEnableHorizontalScroll(false)但找不到它.

有没有简单的方法来做到这一点?

java swing jscrollpane horizontal-scrolling

15
推荐指数
3
解决办法
4万
查看次数

所以DOM scrollIntoView对齐顶部/底部,但是左/右呢?

我想水平滚动给定的元素.我找到的唯一方法是使用ScrollIntoView DOM方法,它允许将元素的底部与视图底部或顶部对齐 - 与视图顶部对齐.

但是,如果元素相对于Y轴是正常的,我只想水平滚动它怎么办?如何将左侧与左侧视图或右侧视图右侧对齐?

编辑

这是更多的背景.我有一个带有水平滚动条的YUI表.我希望以编程方式将其滚动到某个TD节点.我不认为window.scrollTo对我有任何帮助,因为滚动条位于div元素上,而不是整个页面上.

EDIT2

原来有一个重复的SO问题,答案正确 - 如何用自己的滚动条以编程方式滚动div?

投票关闭我的.

html javascript dom horizontal-scrolling

15
推荐指数
1
解决办法
9253
查看次数

如何用拇指实现滚动条以实现快速滚动

我需要实现一个大约有1000个缩略图的屏幕.此屏幕应支持基于手势的滚动以及使用拇指滚动条快速滚动.因此,如果用户想要从第1页移动到第100页,他只需拖动拇指即可到达那里.

但Android中没有这样的控制权.有寻求酒吧,但它的外观和感觉与我想要的不相似.我还想轻弹和滑动可以使用horizo​​ntalscrollbar继承的功能.所以我想在我的应用程序中添加水平scroolbar以及seekbar的功能.

但我面临一些问题,要将拇指位置与滑动或轻弹事件同步,并且还需要修改搜索栏的拇指外观.

请提出一些线索.

android horizontal-scrolling

13
推荐指数
1
解决办法
8415
查看次数

如何使用鼠标启用水平滚动?

我无法确定如何使用鼠标滚轮水平滚动.垂直滚动可以自动运行,但我需要水平滚动我的内容.我的代码看起来像这样:

<ListBox x:Name="receiptList"
         Margin="5,0"
         Grid.Row="1"
         ItemTemplate="{StaticResource receiptListItemDataTemplate}"
         ItemsSource="{Binding OpenReceipts}"
         ScrollViewer.VerticalScrollBarVisibility="Disabled">
    <ItemsControl.ItemsPanel>
        <ItemsPanelTemplate>
            <StackPanel Orientation="Horizontal"
                        ScrollViewer.HorizontalScrollBarVisibility="Visible"/>
        </ItemsPanelTemplate>
    </ItemsControl.ItemsPanel>
</ListBox>
Run Code Online (Sandbox Code Playgroud)

我的项目模板如下所示:

<DataTemplate x:Key="receiptListItemDataTemplate">
    <RadioButton GroupName="Numbers"
                 Command="{Binding Path=DataContext.SelectReceiptCommand,RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type POS:PointOfSaleControl}}}"
                 CommandParameter="{Binding }"
                 Margin="2,0"
                 IsChecked="{Binding IsSelected}">
        <RadioButton.Template>
            <ControlTemplate TargetType="{x:Type RadioButton}" >
                <Grid x:Name="receiptGrid" >
                    <Grid>
                        <Border BorderThickness="2" 
                                BorderBrush="Green" 
                                Height="20" 
                                Width="20">
                            <Grid x:Name="radioButtonGrid" 
                                  Background="DarkOrange">
                                <TextBlock x:Name="receiptLabel"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Center"
                                           Text="{Binding Path=NumberInQueue, Mode=OneWay}"
                                           FontWeight="Bold"
                                           FontSize="12"
                                           Foreground="White">
                                </TextBlock>
                            </Grid>
                        </Border>
                    </Grid>
                </Grid>

                <ControlTemplate.Triggers>
                    <Trigger Property="IsChecked" Value="True">
                        <Setter Property="Margin" 
                                TargetName="receiptGrid" 
                                Value="2,2,-1,-1"/>
                        <Setter Property="Background"
                                TargetName="radioButtonGrid" 
                                Value="Maroon"/>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </RadioButton.Template> …
Run Code Online (Sandbox Code Playgroud)

wpf scrollviewer horizontal-scrolling

13
推荐指数
5
解决办法
1万
查看次数

如何在iphone中使用水平滑动逐页显示PDF?

我想创建一个页面的PDF阅读器.

我知道如何使用UIWebView来显示PDF但它会加载整个PDF并希望一次显示一个页面.

PDF存储在本地.应根据水平滑动加载下一个和上一个PDF页面.

如何显示单个页面以及水平滑动和缩放功能?这种问题的最佳方法是什么?有没有这方面的教程?

编辑:我已经使用CGPDF API逐页显示PDF.我使用PDF页面作为图像.但是,由于也使用了UIPageControl,因此缩放功能无法正常工作.如何缩放这些图像以及页面控制?

pdf iphone horizontal-scrolling uitouch cgpdfdocument

13
推荐指数
2
解决办法
5745
查看次数

水平滚动与ios的视差背景

我正面临着创建介绍视图的挑战,比如"Cleanio"应用程序(https://itunes.apple.com/fr/app/cleanio-pressing-la-demande/id885856031?mt=8).
这是它的样子:
在此输入图像描述 在此输入图像描述 在此输入图像描述


因此,背景和叠加层是独立移动的,而不是以相同的速度移动.
有没有人有一个起点如何实现?

horizontal-scrolling ios parallax

13
推荐指数
1
解决办法
3906
查看次数

Fullpage.js滚动时水平滑动

我使用fullpage.js来实现垂直和水平滚动.

我想在第2节滚动时滑块滑动.

功能类似于本 网站

这是我的代码:

$(document).ready(function() {
$('#fullpage').fullpage({
    sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE', 'whitesmoke', '#ccddff'],
    anchors: ['firstPage', 'secondPage', '3rdPage', '4thpage', 'lastPage'],
    menu: '#menu',
    css3: true,
    loop: false,
    afterLoad: function(anchorLink, index) {
        var loadedSection = $(this);

        //using index
        if (index == 3) {
            $.fn.fullpage.setAllowScrolling(false);
            $.fn.fullpage.setKeyboardScrolling(false);
            $(window).bind('mousewheel DOMMouseScroll', function(event) {
                if (event.originalEvent.wheelDelta > 0 || event.originalEvent.detail < 0) {
                    $(".fp-prev").click();
                    if ($(".fp-slide:first-child").hasClass("active")) {
                        $.fn.fullpage.setAllowScrolling(true);
                        $.fn.fullpage.setKeyboardScrolling(true);
                    }
                } else {
                    $(".fp-next").click();
                    if ($(".fp-slide:last-child").hasClass("active")) {
                        $.fn.fullpage.setAllowScrolling(true);
                        $.fn.fullpage.setKeyboardScrolling(true);
                    }
                }
            });
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

});

对于视觉:在此输入图像描述

html javascript jquery horizontal-scrolling fullpage.js

13
推荐指数
1
解决办法
8996
查看次数

Byobu鼠标滚动 - [OSX + Iterm2]

我试图在我的本地(非ssh)byobu安装中启用鼠标滚动功能.

我尝试过做的事情:

  1. 按F7并使用鼠标滚动会导致以下结果 滚动不正确

  2. 启用了Iterm2中的"将行保存为回滚选项" 保存行以向后滚动选项

  3. 将〜/ .tmux.conf更改为

    set -ga terminal-overrides 'xterm*:smcup@:rmcup@'
    set-option -g mouse on
    
    Run Code Online (Sandbox Code Playgroud)

似乎没有什么能够启用鼠标滚动.我已经阅读了有关StackOverflow和Google的所有信息,但无济于事.

gnu-screen horizontal-scrolling tmux byobu iterm2

13
推荐指数
1
解决办法
909
查看次数

Flutter中垂直ScrollView内的水平ListView

如今,我正在尝试实现一种非常常见的行为,即在另一个可滚动的小部件中放置一个水平列表。考虑一下像imdb应用程序的主屏幕这样的内容:

在此处输入图片说明

所以我想有一个垂直滚动的小部件,上面没有几个项目。在它的顶部应该有一个水平线ListView,后面跟着一些叫做的项目motivationCard。列表和卡片之间也有一些标题。

我在我的身上有这样的东西Widget

@override
  Widget build(BuildContext context) => BlocBuilder<HomeEvent, HomeState>(
        bloc: _homeBloc,
        builder: (BuildContext context, HomeState state) => Scaffold(
              appBar: AppBar(),
              body: Column(
                children: <Widget>[
                  Text(
                    Strings.dailyTasks,
                  ),
                  ListView.builder(
                    scrollDirection: Axis.horizontal,
                    itemCount: tasks.length,
                    itemBuilder: (BuildContext context, int index) =>
                        taskCard(
                          taskNumber: index + 1,
                          taskTotal: tasks.length,
                          task: tasks[index],
                        ),
                  ),
                  Text(
                    Strings.motivations,
                  ),
                  motivationCard(
                    motivation: Motivation(
                        title: 'Motivation 1',
                        description:
                        'this is a description of the motivation'),
                  ),
                  motivationCard(
                    motivation: Motivation(
                        title: 'Motivation 2', …
Run Code Online (Sandbox Code Playgroud)

android listview horizontal-scrolling flutter flutter-layout

12
推荐指数
3
解决办法
6476
查看次数