问题标签 [scrollview]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
494 浏览

android - 如何更改android中滚动视图的默认外观?

我在我的应用程序中使用滚动视图。我想知道如何将滚动视图(即一条线)的默认外观更改为不同的东西,可能是android中的图像或箭头。

任何形式的帮助或提示将不胜感激。

在此先感谢, HM

0 投票
1 回答
317 浏览

objective-c - 如何在滚动条中包含其他控件?

我想创建一个带有缩放控件和滚动条旁边的按钮的滚动视图。有点像 XCode 中的“平铺窗口”按钮(编辑器的右上角),它应该位于通常仅由滚动条使用的同一个框中。

你知道如何解决这个问题吗?

我正在考虑使用NSScrollView并将滚动条设置为NSScroller包含其他小部件的自定义子类。哪些按钮使用与滚动条相同的样式?

0 投票
3 回答
5993 浏览

iphone - 无法触摸 UIScrollView 上的 UITextField

我知道这已经被谈论了很多。我想我已经解决了这个网站上的每一个问题,但仍然无法让它发挥作用。

我是开发新手,但我对我的所有代码的情况有很好的了解。不过,我绝对没有太多经验,这是我的第一个 iPhone 应用程序。

我正在制作一个由 UIScrollView 中的多个 UITextField 组成的数据输入字段。我暂时避免解释其他细节,因为这似乎是一个非常基本的问题。没有滚动视图,文本字段可以完美运行。我可以触摸文本字段,然后键盘或选择器视图会正确显示。当我将文本字段添加到滚动视图时,滚动视图可以工作,但是文本字段不会收到我的触摸。
这是关键:启用“用户交互”时,滚动视图有效,但未注册文本字段触摸。当“用户交互”被禁用时,滚动视图不起作用,但文本字段触摸已注册并且键盘/选择器弹出。

从其他帖子中,我看到人们创建子类并在单独的实现中覆盖触摸。我见过人们使用自定义内容视图(子视图?),我见过一些现在已经过时的解决方案,因为 API 在较新版本的 SDK 中发生了变化,我完全被卡住了。

我现在将省略我的代码,因为也许有人拥有不需要我的代码的解决方案。如果有人需要看我的代码,我会把它放上来。我的应用程序是用 3.1.3 SDK 编写的。

如果有人有任何可以提供帮助的信息,将不胜感激。

0 投票
1 回答
1313 浏览

jquery - 容器中的图像 jQuery 滚动条。(如 facebook 裁剪器)无法获取位置值

有一种真正的心灵痛苦。

我有一个 php 图像上传器,它很好,并且对文件进行了排序,并且 jquery ajax 将图像返回到一个经过修改的 html div 中,其中 div 设置如下:

图像查看正常,我正在使用 jquery scrollview 插件:http ://code.google.com/p/jquery-scrollview/

我尝试在插件中添加几行来存储 scrollTop 和 Left 的变量,然后在我的页面中用 x 和 y 替换两个隐藏的输入值。然后在 div 中返回的 ajax html 上,我试图单击按钮(例如)检索两个隐藏输入的值....

这是我添加到插件中的内容(我不是 js 专家!):

还是没有运气!!

我怎样才能获得 scrollTop 和 scrollLeft 并成功准备它们以发送到另一个 php 脚本!?

谢谢:)

漂亮的

0 投票
3 回答
15513 浏览

java - ScrollView alawys 滚动到底部

我在布局中定义了一个带有 texteedit 的滚动视图:

我使用以下方法向此 ScrollView 添加文本:

如您所见,我附加了文本并尝试滚动到 ScrollView 的底部。不幸的是,这不能正常工作。它向下滚动,但并非总是如此,也不总是向下滚动。有什么提示吗?

0 投票
2 回答
853 浏览

android - 如何将自定义视图添加到 Horizo​​ntalScrollView?

因此,我遵循了在 android 上绘制东西的教程。我创建了一个 Panel 类,它扩展了我使用线程绘制的 SurfaceView。现在我想把这个面板放在一个滚动视图中,特别是一个水平滚动的视图,这样我就可以画出比屏幕更宽的东西。我会去做吗?

0 投票
3 回答
3554 浏览

android - 在 ScrollView 中的 EditText 中启用滚动

我们的应用程序(适用于 Android的 WordPress)为新的帖子视图使用滚动视图,用户可以在其中输入他们的新博客帖子。此视图上有很多字段,包括用于发布内容字段的大型 EditText。

看来,当 EditText 在 ScrollView 中时,ScrollView 会接管滚动操作,因此如果用户正在撰写大型帖子,则无法在 EditText 区域内滚动。可以做些什么使滚动在 EditText 和 ScrollView 中都起作用?

这是此视图的布局 xml,任何帮助将不胜感激!需要滚动的EditText是@id/content:

0 投票
4 回答
16947 浏览

android - 我怎么知道滚动视图已经滚动到底部?

我有一个滚动视图,我只想在它已经滚动到底部时发生一个事件,但我找不到检查滚动视图是否在底部的方法。

我已经解决了相反的问题;只有当它已经滚动到顶部时才允许事件发生:

0 投票
2 回答
2617 浏览

iphone - How to zoom particular part of UIScrollView?

HI, I develop an application in which I want to implement the splash screen, on that splash screen I want to bind the scrollView and UIImage. My code as follow,

On my given code the one blank window comes up and stay on. I want to on that blank screen bind my splash.png.

****The Above problem is solved**** My current code is

I want to zoom the particular part of scrollView.

0 投票
2 回答
2089 浏览

android - Programmatically creating scrollview(s) from custom component in android

I'm trying to build a compound control in Android, containing (among other things) a ScrollView. Things go wrong when I try to view the control in Eclipse, crashing with a NullPointerException after the error message: "Parser is not a BridgeXmlBlockParser".

Stacktrace:

I've traced the error to the following conditions:

  • The NPE is thrown because a Context.obtainStyledAttributes() call returns null when the attrs argument passed is null.
  • This only applies to the BridgeContext implementation used in Eclipse, which expects attrs to be an instance of the BridgeXmlBlockParser.
  • The attrs argument is null because I create the ScrollView using the (Context) constructor.

There is a workaround of course, which is passing the attrs I receive when Eclipse constructs the compound control, but I don't want all the attributes set on the compound control to apply to my inner control.

Am I doing something wrong, is this a bug in Android Eclipse, ...?

This is what my.compound.control.StringPicker.onMeasure looks like (stripped it a bit for clarity):