Jquery uses iscorll to pull up, pull down, and load and refresh
The implementation principle is: Determine whether fiiptop and flipdown are displayed as the basis
MyScroll = new iScroll ('wraphome', {fixedScrollbar: true, hideScrollbar: true, fadeScrollbar: true, hScrollbar: false, vScrollbar: true, onScrollMove: function () {var topstat = $ (". fliptop "). is (
1, nonsense less said, first look at the mobile end of the list page
(1) Normal browsing
(2) down-Pull Refresh
(3) drop down refresh End
(4) Up-pull loading
(5) Up-pull loading
2, the above is basically a set of mobile end list refresh process, using Better-scroll implementation, its GitHub address can refer to Https://github.com/ustbhuangyi/bette
Milo, http://miloisbadboy.com/archives/55
Since this article is a little long, I will post some code here. For more information, see the original article.
Main source code
Package COM. miloisbadboy. view; import android. content. context; import android. util. attributeset; import android. util. displaymetrics; import android. util. log; import android. view. layoutinflater; import android. view. motionevent; import android. view. view; import android. view. viewgroup; import android. view.
event's y-coordinate 2 is recorded, and when the move event occurs, the y-coordinate of the movement is judged to be able to reach the pull-down or pull-up event 3, and when the Up event occurs, the corresponding event is triggered if the pull-up or pull-down event is reached/*// You need to set the following variable
Do the pull-up and pull-up loading, the internet looked at countless code, helpless, I need to take data from the background, the web's all-in-one is posted on the official website code, for loop loading data, pull refresh, drop-down display more data, when they do, Since I am the background JSON parsing fetch, has not been shown the effect I want, and then after
Mobile touch event | pull up to load more, touch to loadPreface:
When it comes to project development, Baidu pulled up and down various mobile terminals due to the issue of loading more pages to achieve the paging effect.
To load more plug-ins. Then there is a pitfall: the user's wrong posture will occur during the pull
Don't say anything first, on:The first page is displayed by default:Pull-up loads the next page:Pull to a certain height:To release the load:Drop-down loading previous page:Drop down to a certain height:To release the load:Code has been uploaded: http://download.csdn.net/detail/zengchao2013/8837971Common headers and footer can be used directly.Three parameters to pass in: whether it is the first page, whether it is the last page, the current number of pagesUI display for header and footer, first
Feel a person to play lol also uninteresting, play will mobile phone, see this drop-down refresh function wrote this demo!
This demo write more casual, I can not use as Plug-ins, the basic idea is no problem, to use their own encapsulation it!
Directly on the code analysis under it!
Layout:
Just 2 lines, just to achieve the function, enough!
JS is not complicated, first define 2 variables, throughout the demo, into the global variable, of course, the encapsulation can also be u
Reprint please indicate the original address:http://blog.csdn.net/yalinfendou/article/details/47707017 about AndroidDrop-down refresh pull-up loading, online demo too Much too much, here is not to introduce how to achieve dropdown refresh Pull-up loading, but for the pull-up refresh pull-up
1, Xlistview because added header, will result in the storage of data +1, so the assignment needs position-1. Add: When removing headerview, position does not need-1. 2, make a suggestion: pull load more, preferably in OnCreate () in the execution of Setadapter, and then whether it is empty data, or data, only with the update adapter on the line. One, Xlistview 2, usageImport a Me.maxwin.view package in a d
Objective
Some time ago need to use to Recyclerview, just want to find a package of good drop-down refresh, pull the load of the library, the results Leng did not find, they wrote a.
Note: I'm talking about "pull up", not sliding to the bottom of the load automatically. Although now automatic loading is the mainstrea
I've written an article about the Drop-down Refresh control. Drop-down Refresh control Terminator:pulltorefreshlayout, and then see a lot of people and pull load more requirements, so on the previous Drop-down refresh control on the basis of the improvement, add the function of pull loading. Not only that, I've changed it to be universal for all view! You can use
Android built-in refresh SwipeRefreshLayout pull load more automatic refresh, swiperefreshlayout
Previously, this article mainly focused on SwipeRefreshLayout, which is provided by the system. However, it only supports pull-down refresh and does not load more functions. But I don't know why the official SwipeRefreshLay
In many software, we will use the pull-up refresh, and most will also have a pull-load function, Pulltorefresh This control can help us achieve this effect.
To use this space first we need to guide the package
Layout file
A simple Pulltorefreshlistview is added to the layout file.
linearlayout xmlns: Android = "http://schemas.android.com/
IdeasToday take everyone to achieve a pull-up load more Listview.github Portal: Pulmlistview, welcome everyone forkstar.Let's take a look at the idea, if we're going to implement a pull-up load for more ListView, the features we need to implement include:
A custom ListView, and the ListView can determine wheth
Custom Control LoadlayoutImportAndroid.content.context;importAndroid.graphics.drawable.animatable;importAndroid.graphics.drawable.drawable;importAndroid.util.attributeset;importAndroid.view.layoutinflater;importAndroid.view.motionevent;importAndroid.view.view;importAndroid.view.viewconfiguration;importAndroid.widget.abslistview;importAndroid.widget.framelayout;importAndroid.widget.listview;importAndroid.widget.textview;importcom.xh.boke.r;/** * Custom Control ListView
Content
Development Environment
Demonstrate how to pull up and down to refresh the latest and load more ListView
References
This article demonstrates how to pull up and down, refresh the most, and load more. This effect is very common. For example, when news and information apps
.
Supports a variety of sliding styles to fit headers and footer of various effects: pan, stretch, back fix, top fixed, fullscreen
Supports content size Adaptive content-wrap_content
Inheritance overrides and extensions are supported, internal implementations do not have private methods and fields, and overrides can be overridden after inheritance
Support for cross-over resilience (Listview, Recyclerview, ScrollView, WebView ... View)
Support multi-touch,
"YALSunnyRefreshControl.h", and @property a Yalsunnyrefreshcontrol object for the class.:The Yalsunnyrefreshcontrol is then initialized and associated with the UITableView or uicollectionview that is required to implement the Refresh function, with the following specific code:Finally, the images needed to refresh the animation are introduced, which are downloaded with the code and can be used with his or her ownThe results shown in the final implementation are as follows:When the table is pulle
Objective
The previous section has a mobile phone side of the project needs to use the drop-and-pull load more effect, the first reflection of the mind is micro-bo that effect, the beginning of the understanding of some deviations, think that the drop is also appended data, pull is also appended data, after consulting colleagues found that in fact the dropdown j
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.