GithubHelp home page GithubHelp logo

naver / android-pull-to-refresh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chrisbanes/android-pulltorefresh

312.0 312.0 82.0 5.93 MB

Pull To Refresh Views for Android! v3.2.3

License: Apache License 2.0

Groovy 0.54% Java 99.46%

android-pull-to-refresh's People

Contributors

adstro avatar cfgxy avatar cketti avatar dhuckaby avatar giack avatar indiebrain avatar intrications avatar khelll avatar kmmbvnr avatar lishali12345 avatar mgalkin avatar ncoolz avatar nevalla avatar pboos avatar robux4 avatar rtyley avatar scorcher avatar seanponeil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-pull-to-refresh's Issues

Unable to use Library in Eclipse

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?

Integration of StaggeredGridView

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..

When the soft keyboard pops up, shake occur list

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

Can't I set divider color in listview?

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?

Pull to refresh disappears if listview items is zero when pulled twice

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

FloatMath is deprecated

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 ?

How to trigger pull to refresh and show its loading animation by java code?

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.

Default rotate drawable cropped while rotating

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?

screenshot_2014-06-26-19-27-46

OnItemClickListener - wrong position parameter

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.

Weird behavior of PullToRefreshGridview

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~

Loading on empty List

When the list is empty and we force a manual refresh the loading animation stays hidden.

How to build Customization PullToRrefresh with ant

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"

Support gradle

Is there plan about supporting gradle project?
exactly, Android Studio :)

ScrollTo

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

Customisation option request - don't display labels

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?

It's a BUG in PullToRefreshGridView?

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.

Please make sure this project is support with aar

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.

Nullpointer on layout preview

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)

How can i get the same animation when Pulling Up from the bottom in ListView?

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.

  1. I know when pulling up from the bottom, setOnLastItemVisibleListener triggered.
  2. So I pasted these code:
            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.

issue of height item.

I have tried to extend PullToRefreshBase in order to create a new pull-refresh-view called as MultiColumnListView.

I have facing the following issue:

  1. height of item at very top position have been cut off if I'm scrolling up slowly. However it won't happen if i'm scrolling up at very fast speed.

any idea about how to solve this issue?

Dev branch

Hello!

I want to send a pull request but I can't find the dev branch.

How to center the default loading image?

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

Add support to android studio preview

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 

issue with viewpager fragment

it doesn't work with viewpager as the pull-to-referesh will jump back immediately after you are pulling down on screen.

The loading layout has failed to be created. java.lang.reflect.InvocationTargetException

안녕하세요 스튜디오 사용자인데요
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)
이런 오류가 발생하네여 ㅠㅠ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.