naver / android-pull-to-refresh Goto Github PK
View Code? Open in Web Editor NEWThis project forked from chrisbanes/android-pulltorefresh
Pull To Refresh Views for Android! v3.2.3
License: Apache License 2.0
This project forked from chrisbanes/android-pulltorefresh
Pull To Refresh Views for Android! v3.2.3
License: Apache License 2.0
How?
I'm unable to use this library inside my project in eclipse. Library succefully Import in Eclipse but It give's me lot's of error in library. What is the easiest way to use it?
anyone have idea how to integrate staggeredgridview to this library?
I've managed to done the integration, but the pull-to-referesh jump back to top position immediately when i'm pulling down..
I hava a PullToRefreshListview and a EditText,PullToRefreshListview in the middle, EditText at the bottom,When the soft keyboard pops up, shake occur list。I looked at the code,Because I set android: windowSoftInputMode = "adjustResize",so OnSizeChanged method of PullToRefreshListview calls, re-modify the layout.I do not know how to solve this
in normal listview, i can change divider color by setDivider and setDividerHeight.
But I can't do the same thing in pull-to-refresh listview..
can't i change divider color programmatically?
In you code if you pull an empty listview it shows that its Loading More items, now if I pull it again it goes off the screen
So in your example of LauncherActivity, goto PullToRefreshListActivity.java file and under you declaration of private String[] mStrings = { "Abb .... er"} remove all elements and so that mStrings has size 0 and now when you pull the listview twice you will see the Loading More goes of the screen on the second pull
I modified a sample and it works in Android 4.4 emulator but not 2.3 emulator. In 2.3, it seems the "pull" does take effect but the animation is not shown.
Anyway, an easiest workaround is to make it clear in doc which Android platform version is supported, and ask people to use a different layout for older version.
I have these lines when i use Proguard to signed my apk
Warning:com.handmark.pulltorefresh.library.PullToRefreshWebView: can't find referenced method 'float floor(float)' in library class android.util.FloatMath
Warning:com.handmark.pulltorefresh.library.PullToRefreshWebView$InternalWebViewSDK9: can't find referenced method 'float floor(float)' in library class android.util.FloatMath
I added the line below to my proguard but it doesn't work
-keep public class android.util.FloatMath
Does someone have a solution about that ?
I have a fragment using pull-to-refresh
to refresh my listview, I know when user pull by hand, OnRefreshListener
triggered, But i want this:
When users open this fragment, they don't have to pull by hand, fragment itself pull to refresh and show loading animation. Please tell me what to do.
Thanks.
Is it possible to allow items in a Scrollview to be clickable when refreshing?
I'm unable to import and use the project inside my project in Android Studio. What is the easiest way to use it?
Look carefully at the screenshot to see the end of the arrows being cropped while the view is rotating. This happens because the image is not square and thus gets cropped while rotating. It could be fixed adding some padding to the png so that it is totally square.
Also, how to provide my own drawable to fix this temporarily? I have read https://github.com/nhnopensource/android-pull-to-refresh/wiki/Customization but I don't know how to override RotateLoadingLayout, I'm using the library as an AAR package. How can I change it externally, ie without having the source code?
문서랑 이것저것 참고해서 해봐는데 잘안되네요...
샘플에도 그러한 예제도없어서 좀 난감하군요
I'm using 3.2.0 version. When I use setOnItemClickListener method on PullToRefreshListView, the callback method delivers wrong position parameter value.
position becomes +1. I think it includes the hidden loading indicator view.
Hi~
At first, I'm really enjoying your solution nowadays~ thanks
I think PullToRefreshGridView has a scrolling issue
(i'm using ptrMode = both)
when i pulled down the gridview at first time, header view was shown and kept its position well.
but when i was scrolling down the gridview view, header view didn't scrolled (always visible)
and i pull down the gridview one more time while refreshing, gridview (refreshing view) didn't keep its position. (always hidden)
please, help~
What is the possible way to only show image at center instead ?
When the list is empty and we force a manual refresh the loading animation stays hidden.
I use PullToRefreshListView.
How could I save scroll position when I refresh my listview?
compile: naver.xx.xx
I need to use f.e. indicator arrow drawable for pull/refresh animation and custom loading spinner for loading.
If I use "ptrDrawable" in the layout or setLoadingDrawable animation works like rotate. If I use getDefaultDrawableResId() in the LoadingLayout situation is the same.
thanks :)
How can I use RecyclerView instead of ListView?
PullDownToRefresh does work but PullUp doesn't
Hi, I have read the Customization guide, and I follow this section "Customizing icon and custom labels ( another way )" to customize my pullToRefresh view.
It works well in eclipse debug build. (customized)
But Failed in ant release build. (isn't customized)
Could you please tell me what can I do to have a customized PullToRefresh view After ant build ?
Thank you !
This is my customized step following the guide :
1、cause I don't need Flip and rotate, so I Override the LoadingLayout instead of FlipLoadingLayout(or RotateLoadingLayout). And I name it with PullToRefreshCustomLoadingLayout.
2、In my_project(not the pullToRefresh project)/assets/pulltorefresh.xml, I use
<layout name="custom”>
com.example.component.widget.layout.PullToRefreshCustomLoadingLayout
3、in layout, I use
<com.handmark.pulltorefresh.library.PullToRefreshScrollView
xmlns:ptr="http://schemas.android.com/apk/res-auto"
ptr:ptrAnimationStyle="custom"
Is there plan about supporting gradle project?
exactly, Android Studio :)
is it possible to add my own headerview to listview?
I've added a custom header at PullToRefreshListView, now i'm trying to hide a partial portion of this header using scrollTo(0, y) but I get an empty space at the bottom of the last visible item in the list. The height of this space seems to be exactly the offset used in scrollTo. Any ideas?
Thank you
I'd like to disable all labels and have just the rotating image in the center.
Couldn't find a way to customize that, settings label strings to an empty string won't help either (image is aligned to the left side).
How can I do this without adding the library as a module to my project?
early, i found the issue in old pulltorefreshGridview...but now still exists..
just do like this :
everytime you pull down or pull up to load more ..just make the new data size is only 1..that meas gridview only add one item at a time .. when you gridview items over the current screen, you pull up again,you will found the new item will not display...and go on you pull up again,the gridview display 2 new items..
i don't know is that a bug ? but when you load data size is > 1 at a time ,it seems display normal.
for help, thank you.
the version 3.2 in maven repo is type of apklib
please change the packaging type in android-pull-to-refresh / library /pom.xml <packaging>apklib</packaging>
to
<packaging>aar</packaging>
thanks a lot.
I am getting rendering problems in the layout preview in Android Studio when using any of the views - in this example com.handmark.pulltorefresh.library.PullToRefreshListView.
Getting these able to display in the preview would certainly be helpful.
Rendering Problems
The following classes could not be instantiated:
- com.handmark.pulltorefresh.library.PullToRefreshListView (Open Class, Show Exception)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE
Exception Details
java.lang.NullPointerException
at android.content.res.BridgeResources.getXml(BridgeResources.java:554)
at com.handmark.pulltorefresh.configuration.xml.PullToRefreshXmlConfiguration.init(PullToRefreshXmlConfiguration.java:92)
at com.handmark.pulltorefresh.library.PullToRefreshBase.init(PullToRefreshBase.java:1358)
at com.handmark.pulltorefresh.library.PullToRefreshBase.<init>(PullToRefreshBase.java:201)
at com.handmark.pulltorefresh.library.PullToRefreshAdapterViewBase.<init>(PullToRefreshAdapterViewBase.java:84)
at com.handmark.pulltorefresh.library.PullToRefreshListView.<init>(PullToRefreshListView.java:50)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:379)
at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:99)
at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:172)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:132)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:806)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:809)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:782)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:401)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:329)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:333)
at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:674)
at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:663)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:663)
at com.android.tools.idea.rendering.RenderService.render(RenderService.java:790)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:611)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1900(AndroidLayoutPreviewToolWindowManager.java:81)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:553)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:548)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
Hello everyone, It's a great lib, I have included in my project, I wonder how can i get the same animation when Pulling Up from the bottom in ListView.
setOnLastItemVisibleListener
triggered. mListItems.addLast("Added after refresh...");
mAdapter.notifyDataSetChanged();
// Call onRefreshComplete when the list has been refreshed.
mPullRefreshListView.onRefreshComplete();
to onLastItemVisible
.
3. It did work, but I can't get the loading animation.
4. How do i do.
I have tried to extend PullToRefreshBase in order to create a new pull-refresh-view called as MultiColumnListView.
I have facing the following issue:
any idea about how to solve this issue?
Hello!
I want to send a pull request but I can't find the dev branch.
To me it makes perfect sense to set a BaseExpandableListAdapter as adapter for a PullToRefreshExpandableListView, however this is currently not possible.
Is this a bug? If not how to work around it or what is a better alternative?
Hi there,
any chances to set the default loading image in the center of the loading layout?
I tried with ptrViewRefeshableViewProgressBarOnCenterWhileRefreshingEnabled but it does not change the position and the image still on the left.
Thank you
It seems the onScrollChanged
method is only called when I'm pulling, not by normal scrolling.
How to differentiate the scroll direction in scroll view. I can't get the Scroll direction on Pull to refresh Scrollview. is there any way to do this?
please help
I get this:
The following classes could not be instantiated:
- com.handmark.pulltorefresh.library.PullToRefreshListView (Open Class, Show Exception)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE Exception Details java.lang.NullPointerException
at android.content.res.BridgeResources.getXml(BridgeResources.java:548)
at com.handmark.pulltorefresh.configuration.xml.PullToRefreshXmlConfiguration.init(PullToRefreshXmlConfiguration.java:92)
at com.handmark.pulltorefresh.library.PullToRefreshBase.init(PullToRefreshBase.java:1358)
at com.handmark.pulltorefresh.library.PullToRefreshBase.<init>(PullToRefreshBase.java:201)
at com.handmark.pulltorefresh.library.PullToRefreshAdapterViewBase.<init>(PullToRefreshAdapterViewBase.java:84)
at com.handmark.pulltorefresh.library.PullToRefreshListView.<init>(PullToRefreshListView.java:50)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:755)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:758)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:373) Copy stack to clipboard
it doesn't work with viewpager as the pull-to-referesh will jump back immediately after you are pulling down on screen.
안녕하세요 스튜디오 사용자인데요
1097-1097/kr.co.withweb.ental E/LoadingLayoutFactory﹕ The loading layout has failed to be created.
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at com.handmark.pulltorefresh.library.LoadingLayoutFactory.tryNewInstance(LoadingLayoutFactory.java:123)
at com.handmark.pulltorefresh.library.LoadingLayoutFactory.createLoadingLayout(LoadingLayoutFactory.java:105)
at com.handmark.pulltorefresh.library.PullToRefreshBase.createLoadingLayout(PullToRefreshBase.java:725)
at com.handmark.pulltorefresh.library.PullToRefreshBase.init(PullToRefreshBase.java:1423)
at com.handmark.pulltorefresh.library.PullToRefreshBase.(PullToRefreshBase.java:201)
at com.handmark.pulltorefresh.library.PullToRefreshAdapterViewBase.(PullToRefreshAdapterViewBase.java:88)
at com.handmark.pulltorefresh.library.PullToRefreshListView.(PullToRefreshListView.java:51)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:600)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
at kr.co.withweb.ental.fragment.CategoryFragment.onCreateView(CategoryFragment.java:236)
이런 오류가 발생하네여 ㅠㅠ
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.