Questions tagged [swiperefreshlayout]

SwipeRefresLayout is a standard way to implement the common Pull to Refresh pattern in Android.

Description

The SwipeRefreshLayout should be used whenever the user can refresh the contents of a view via a vertical swipe gesture. The activity that instantiates this view should add an OnRefreshListener to be notified whenever the swipe to refresh gesture is completed. The SwipeRefreshLayout will notify the listener each and every time the gesture is completed again; the listener is responsible for correctly determining when to actually initiate a refresh of its content. If the listener determines there should not be a refresh, it must call setRefreshing(false) to cancel any visual indication of a refresh. If an activity wishes to show just the progress animation, it should call setRefreshing(true). To disable the gesture and progress animation, call setEnabled(false) on the view.

Link

Android Developer

685 questions
-1
votes
2 answers

Pull the whole layout down on swipeRefreshLayoutListener android

I want to move the whole layout down when SwipeRefreshLayout Listener is called? Is this thing possile in android .? This is my whole xml layout.SwipeRefreshLayout contains a progressbar and FrameLayout and that is included in a RelativeLayout.So I…
-1
votes
1 answer

Scroll down refreshes my list from all positions

I am not able to scroll down after scrolling up in my home fragment.List view has been set swipe down refresh.I need both the swipe down and scroll down in my application but refresh action should only work if the list is at the top. my home…
-1
votes
3 answers

java.lang.ClassCastException: android.support.v7.widget.RecyclerView cannot be cast to android.support.v4.widget.SwipeRefreshLayout

Maybe you will see couple same questions but those didn't help me to solve this. My XML contains RecyclerView inside SwipeRefreshLayout. When I run my code, it throws below exception or app crashes. java.lang.RuntimeException: Unable to start…
-1
votes
1 answer

I keep getting a NullPointerException in ListView

I'm getting a NullPointerException when I run my application: LogCat java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference at…
Kanishka Munshi
  • 530
  • 1
  • 4
  • 11
-1
votes
3 answers

Change spinning wheel style from ProgressBar Android

I have a ProgressBar with the attribute style="?android:attr/progressBarStyleLarge" which shows the next spinning wheel: But to keep the same style in all my application, I wanted to use, in my ProgressBar, the spinning wheel shown on…
IIRed-DeathII
  • 1,117
  • 2
  • 15
  • 34
-1
votes
1 answer

Can't refresh List with drag down Refresh (mSwipeRefreshLayout)

I can't refresh my List (Network thread, so no UI Thread) on my UI Thread via a onRefresh Handler, this is the code I've tried: @Override public void onRefresh() { new Handler().postDelayed(new Runnable() { @Override …
atjahfjvda
  • 99
  • 2
  • 11
-2
votes
1 answer

Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference on Volley while executing Swiperefresh Android

i am having this error java.lang.NullPointerException: Attempt to invoke virtual method int java.lang.String.length() on a null object reference while executing the onRefresh in Android. when i fetch data outside onRefresh method it is fine. here is…
-3
votes
1 answer

"Cannot be applied to" in a fragment class

I have created 4 tablayouts in my APP, and each has a layout source file and class. Also i want to add a SwipeRefreshLayout in this fragment. But there is something wrong when i addswipeRefreshLayout.setOnRefreshListener(getActivity()); And…
-3
votes
1 answer

how to get instant updated listview which data is providing from database?

I send data to database from one device and refresh listview by other device, but I can't see the updated item on listview which I recently inserted to database, how can I get instant updated listview? please someone help me to solve this problem.…
Yasin Enu
  • 5
  • 5
-3
votes
1 answer

using JSON how can we perform scrolling task along with loading of data

i want to perform two tasks i.e; scrolling and loding of data after scrolling task is completed using JSON http://www.souqalkhaleejia.com/webapis/featuredproducts.php?count=¤cy=INR&limit=2 above mentioned url is JSON url for example like the…
prominere
  • 79
  • 2
  • 10
1 2 3
45
46