pull-to-refresh

IllegalStateException in PullToRefreshListView$InternalListViewSDK9

徘徊边缘 提交于 2019-12-12 13:22:43
问题 I'm using PullToRefresh library in two activities of my application. I know, this library is deprecated, but it very useful and it can handle refresh genstures not only from top but also bottom. But it have a problem: rarely application crash with this log: java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView

Scroll to end in a PullToRefreshListView

◇◆丶佛笑我妖孽 提交于 2019-12-12 04:08:49
问题 How do I programmatically upon inserting new items to a PullToRefreshListView scroll so that the last item is visible? Here is some code: listView = (PullToRefreshListView) findViewById(R.id.list); listView.setAdapter(someAdapter); And I would like to do: listView.scrollToEnd(); or someAdapter.scrollToEnd(); or something similar. 回答1: You can set the TranscriptMode on a ListView to have it always scroll to the bottom when new content is added listView.setTranscriptMode(ListView.TRANSCRIPT

Android - PullToRefresh Library used by gmail and others blocks my ListItem Swiping?

半腔热情 提交于 2019-12-11 03:15:48
问题 I am using Chris Banes PullToRefresh Library in my project: https://github.com/chrisbanes/ActionBar-PullToRefresh Before that I used his old library: https://github.com/chrisbanes/Android-PullToRefresh In my project I also copied and pasted parts of SwipeListView library made by 47deg: https://github.com/47deg/android-swipelistview The problem I am facing is.. the SwipeListView (Swipe ListItem) worked great with the old PullToRegresh Library but when I had put the new library the ListItem

SVPullToRefresh cannot pull on an empty UICollectionView

不羁的心 提交于 2019-12-11 02:16:08
问题 I got an empty UICollectionView, which means the cell count is 0 in it. I intended to do so, so when no usable data, numberOfItemsInSection will return 0. Then user can choose to Pull to refresh if no data available. (content size is smaller than screen height, excluding the PullToRefresh arrow views) My problem is if there is at least one cell, pull to refresh works perfect, but when no cell, I cannot pull to refresh. I am not sure how to do it, or if the cell count impact the pullToRefresh?

iOS - Refresh Control - “Attempting to change the refresh control while it is not idle is strongly discouraged and probably won't work properly.”

烂漫一生 提交于 2019-12-10 14:14:38
问题 I cannot find many references to this warning anywhere. I have two view controllers that offer pull-to-refresh control. One is fine. The other produces the warning above. I copied the code from one to the other. The code is as follows (PFUser refers to Parse.com): [super viewDidAppear:animated]; if ([PFUser currentUser]) { NSLog(@"who's the user: %@", [PFUser currentUser]); UIRefreshControl *refreshTable = [[UIRefreshControl alloc] init]; refreshTable.attributedTitle = [[NSAttributedString

How to pass int array of color resource ids from array.xml to SwipeRefreshLayout.setColorSchemeResources

五迷三道 提交于 2019-12-09 15:53:40
问题 I've got Android's SwipeRefreshLayout working and am trying to customize the colors across all the pull to refreshes throughout the app. In order to follow the DRY principle, I've tried moving the desired colors to array.xml as follows: <resources> <array name="swipeRefreshColors"> <item>@color/pink</item> <item>@color/green</item> </array> </resources> However, when I try and import them into the swipe to refresh: swipeRefreshLayout.setColorSchemeResources(R.array.swipeRefreshColors); I get

Android PullToRefesh library customize loading pulling/refreshing image

邮差的信 提交于 2019-12-08 12:48:38
问题 I am using com.handmark.pulltorefresh.library.PullToRefreshListView. By default it shows : But I want pulltorefresh images/desing as following: Here is xml i am using: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <com.handmark.pulltorefresh.library.PullToRefreshListView android:id="@+id/lv_Inbox" android:layout_width="fill_parent" android:layout_height="fill

Customize Android Pull-To-Refresh Icon

女生的网名这么多〃 提交于 2019-12-07 14:56:51
问题 is it possible to replace the Icon of the Pull-To-Reload, the circle-arrow, with something else? I'd like to have something like a trash-can instead. Thanks, Georg 回答1: If you are using the SwipeRefreshLayout, it seems there is no way to change the icon or animation for it yet. You can change the colors for the animation of spinning lines with the setColorSchemeColors method. Some external pull to refresh libraries do let you do it, like Ultra Pull to Refresh by liaohuqiu. It seems to allow a

Error in pull down to refresh list view android

人走茶凉 提交于 2019-12-07 14:18:18
问题 I am using the feature pull down to refresh by using this library of chrisbanes But when I tried to import this widget in my xml file It shows me the following error.Please help me how to solve this. Error: com.handmark.pulltorefresh.library.PullToRefreshListView failed to instantiate. 回答1: I would definitely take a look at Chris Banes' implementation of pull-to-refresh. His code does not only include this interaction style for ListView, but also GridView and WebView. Especially the latter

Application throws java.lang.StackOverflowError Exception in Activity

元气小坏坏 提交于 2019-12-07 06:46:33
问题 I am working on one Android application. in my one activity i am using PullToRefreshListView. sometime i am getting java.lang.StackOverflowError Exception on my activity. i have tried to fix it and i also searched on google too but not getting perfect solution. i have two activity with same functionality with PullToRefreshListView with same data. but i am getting this Exception on only one activity. other activity is working fine. Here is my full StakeTrace. Please help me. Sorry for my poor