scroller

Javascript (or some other lang) to detect the wheel direction without using pageYOffset

随声附和 提交于 2020-01-06 03:38:29
问题 I have a page not higher than the window => it has no scroller. How can I detect the direction, in which the wheel is rolled? And if JavaScript can't handle this, is there some other net language to help my case? Thanks 回答1: It's given to you wholesale on the MDN page for "wheel" events, reproduced below: (function(window,document) { var prefix = "", _addEventListener, onwheel, support; // detect event model if ( window.addEventListener ) { _addEventListener = "addEventListener"; } else {

How to use Scroller in ViewGroup (android)

自闭症网瘾萝莉.ら 提交于 2020-01-02 09:57:45
问题 I have a custom ViewGroup and would like to add scrolling ability to it. Is it possible to use a Scroller object and link it up with view group? I have read somewhere that Scroller does not do any actual scrolling. That means it must be delegating the scrolling responsibility back to ViewGroup. thanks 回答1: The ScrollView object is what allows for scrolling. Basically, most Views are able to be scrolled, but they have no way of propagating touch events to the View class. A ScrollView handles

How to use Scroller in ViewGroup (android)

不打扰是莪最后的温柔 提交于 2020-01-02 09:57:43
问题 I have a custom ViewGroup and would like to add scrolling ability to it. Is it possible to use a Scroller object and link it up with view group? I have read somewhere that Scroller does not do any actual scrolling. That means it must be delegating the scrolling responsibility back to ViewGroup. thanks 回答1: The ScrollView object is what allows for scrolling. Basically, most Views are able to be scrolled, but they have no way of propagating touch events to the View class. A ScrollView handles

Adobe Air: scroller throws error when changes focus between different applications

自古美人都是妖i 提交于 2019-12-31 01:43:46
问题 TypeError: Error #1009: Cannot access a property or method of a null object reference. at spark.components::Scroller/focusInHandler()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Scroller.as:2139] at flash.display::Stage/set focus() at mx.core::UIComponent/setFocus()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:9905] at spark.components::RichEditableText/setFocus()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\RichEditableText.as:3126] at spark

[原] Android中Scroller类的分析

我的梦境 提交于 2019-12-26 15:24:29
今天看了一下项目中用到的ViewFlow控件,想弄明白其工作原理。从头开始分析,卡在“滚动”这儿了。 做android也快两年了,连最基本的滚动都不熟悉,真是惭愧。。。遂网上找资料,很容易的在google前排找到此文章: Android Scroller类的详细分析 http://blog.csdn.net/gemmem/article/details/7321910 很受启发,学习之后总结一下自己的心得。 文章中的内容这里就不再重复了。 如文章中所写,在弄明白滚动的原理之前,需要先明白 computeScroll() 这个方法。 computeScroll()是View类的一个空函数, 在父容器重画自己的孩子时,它会调用孩子的computScroll方法。所以 这个computeScroll()函数正是我们大展身手的地方,在这个函数里我们可以去取得事先设置好的成员变量mScroller中的位置信息、速度信息等等,用这些参数来做我们想做的事情。 然后放下代码,先考虑几个问题: 1.如何触发滚动? 2.谁要滚动?或者说哪个View要滚动? 3.从哪滚到哪?滚多久? 4.怎么滚动? 脑海中有这几个问题之后,好吧,看一下代码,直接拷一下上述作者文章中的,自己格式化稍改了一下: package cn.supersugar.tablelayout; import android.widget

Flex 4 and ScrollBar stepSize

一世执手 提交于 2019-12-14 04:05:29
问题 I want to specify amount to scroll with VScrollBar. So in Flex 3 we have "lineScrollSize" but how this property called in Flex 4? I thought it VScrolBar.stepSize — but it dose not do anything. Somebody please help me. I just whant my content to scroll faster on mouse wheel. 回答1: Have a look into LayoutBase.getVerticalScrollPositionDelta. You might want to subclass and override it! Here's what I did in my own layout class: override public function getVerticalScrollPositionDelta(navigationUnit

Datatable with Scroller not working

☆樱花仙子☆ 提交于 2019-12-13 05:23:49
问题 Using the last version of DataTable (1.10.9) and the scroller widget (1.3.0), I can't make it work with this simple piece of code: var data = [{'a': 'a', 'b': 'b'}, {'a': 'c', 'b': 'd'}]; var columns = [{'title': 'a', 'data': 'a'}, {'title': 'b', 'data': 'b'}]; $("#mytable").DataTable({ "processing" : true, "filter": false, "orderClasses": false, "ordering": false, data: data, deferRender: false, scrollY: 400, scrollCollapse: true, scroller: { loadingIndicator: true }, dom: "rtiS", columns:

Scroller——startScroll、fling(惯性滑动)

时间秒杀一切 提交于 2019-12-12 09:57:18
Scroller主要用于平滑滚动,主要使用的滚动方法有:startScroll、fling。 startScroll(int startX, int startY, int dx, int dy, int duration): 指定起点(startX,startY),从起点平滑变化(dx,dy),耗时duration,通常用于:知道起点与需要改变的距离的平滑滚动等。 fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY): 惯性滑动。 给定一个初始速度(velocityX,velocityY),该方法内部会根据这个速度去计算需要滑动的距离以及需要耗费的时间。通常用于:界面的惯性滑动等。 来源: https://www.cnblogs.com/Free-Thinker/p/12027386.html

Crossbrowser content scroller with custom look

无人久伴 提交于 2019-12-11 19:26:02
问题 There is a block with horizontal scroll <div class="popular-items"> <div class="popular-wrapper"> <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> </div><!-- .popular-wrapper --> </div><!-- .popular-items--> .popular-items { clear: both; overflow: hidden; } .popular-wrapper { clear: both; overflow-x: scroll; overflow-y: hidden; } .popular-items ul { width: 1200px; } .popular-items li { width: 238px; height: 440px; float: left; text-align: center; border: 1px solid red; } http

Jquery Custom Content Scroller blanks Div content when populated with AJAX html

不羁岁月 提交于 2019-12-11 09:01:00
问题 I am using the Jquery Custom Content scroller from http://manos.malihu.gr/ which appears to be very popular. I initially tried to use it, then switched to Nicescroller which initially worked OK but then I hit a wall with its features and now am back here... There is nothing complex that I am doing. The data comes from AJAX and is fed into a DIV and then the scroller is applied to the DIV on AJAX success. The DIV is actually used to display form error messages and the main HTML around it are