swiperefreshlayout

SwipeRefreshLayout blocking horizontally scrolled RecyclerView

你。 提交于 2019-12-20 02:41:15
问题 My setup is simple enough: <android.support.v4.widget.SwipeRefreshLayout android:id="@+id/swiperefresh" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.v7.widget.RecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="220dp"/> </android.support.v4.widget.SwipeRefreshLayout> The content of onCreate() : layoutManager = new LinearLayoutManager( this ); layoutManager.setOrientation( LinearLayoutManager

SwipeRefreshLayout: Swipe progress animation

拈花ヽ惹草 提交于 2019-12-17 22:50:56
问题 I'm quite new to android and I'm exploring the sample code on google website. The code I'm on currently is the SwipeRefreshLayout: http://developer.android.com/samples/SwipeRefreshLayoutBasic/index.html In the code, we see the SwipeRefreshLayout being executed for a listview, so in other words, if you drag down the list view, the method is triggered and the listview refreshes itself. <android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"

How to adjust the swipe down distance in SwipeRefreshLayout?

会有一股神秘感。 提交于 2019-12-17 21:48:34
问题 I implemented SwipeRefreshLayout in my app. I need to change the height which has to be scrolled down to call onRefresh() method. Which method should I use to add a custom height ? Implementation of SwipeRefreshLayout private SwipeRefreshLayout swipeLayout; In oncreate swipeLayout = (SwipeRefreshLayout)view.findViewById(R.id.swipe_container); swipeLayout.setOnRefreshListener(this); swipeLayout.setColorScheme(android.R.color.holo_blue_dark, android.R.color.holo_green_dark, android.R.color.holo

SwipeRefreshLayout - Pull From Bottom

六眼飞鱼酱① 提交于 2019-12-17 18:50:11
问题 Is there a way to use SwipeRefreshLayout to refresh ListView when it's pulled from bottom? I created pull from top, but I would also need pull from bottom. There are many tutorials on how to create pull from top, but I couldn't find any tutorials for pull from bottom? 回答1: SwipeRefreshLayout from Android Support Library version 21 does not support pull from bottom. I have made modification SwipeRefreshLayoutBottom with is based on original SwipeRefreshLayout code. It is fully based on

android.support.v4.widget.SwipeRefreshLayout working but it is not visible

a 夏天 提交于 2019-12-17 14:41:50
问题 I am using a SwipeRefreshLayout to refresh the content. The problem is that it is working, but is not visible while swiping down. Here's how I have SwipeRefreshLayout in xml file: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent

SwipeRefreshLayout + WebView when scroll position is at top

心已入冬 提交于 2019-12-17 06:39:14
问题 I'm trying to use SwipeRefreshLayout with WebView. I'm facing the problem where in the middle of page, when user scrolls down, unwanted refresh kicks in. How do I make the refresh event only happen when webview's scroll position is at the top. (ie, he's looking at the top portion of the page)? 回答1: I've managed to solve it without having to extend anything. Have a look at this snippet (Fragment-specific): private ViewTreeObserver.OnScrollChangedListener mOnScrollChangedListener; @Override

HorizontalScrollView inside SwipeRefreshLayout

旧街凉风 提交于 2019-12-17 04:17:37
问题 I implemented the new SwipeRefreshLayout component in my application and it works well with any vertical views, like ListView , GridView and ScrollView . It behaves very bad with horizontal views, like HorizontalScrollView . When scrolling to the right or left, the SwipeRefreshLayout view caches the touch, prevents the HorizontalScrollView from receiving it and starts scrolling vertically to perform the refresh. I tried solving this issue as I previously solved issues with vertical ScrollView

setProgressViewOffset(boolean, int, int) is undefined for the type SwipeRefreshLayout

感情迁移 提交于 2019-12-14 03:13:35
问题 Using the new SwipeRefreshLayout from Support Revision 21 (or latest today, from sdk manager) I get it to work but I need to move down the view using import android.support.v4.widget.SwipeRefreshLayout; .... mSwipeLayout = (SwipeRefreshLayout) findViewById(R.id.swipe); mSwipeLayout.setProgressViewOffset(false, 100, 150) The method setProgressViewOffset(boolean, int, int) is undefined for the type SwipeRefreshLayout. How to fix this? 回答1: Clean your project and rebuild. You may be compiling

SwipeRefreshLayout causes NullPointerException in onCreate

走远了吗. 提交于 2019-12-13 04:14:54
问题 Running my app with SwipeRefreshLayout is causing the app to crash. I have tried to debug the issue, but it seems to occur after the setColorScheme in which it goes into ensureLayout The logcat: 07-09 16:46:56.093: E/AndroidRuntime(18659): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.heath_bar.twitter/com.heath_bar.twitter.MainActivity}: java.lang.NullPointerException 07-09 16:46:56.093: E/AndroidRuntime(18659): at android.app.ActivityThread.performLaunchActivity

coordinatorlayout not scrolling with swipeRefreshlayout

痞子三分冷 提交于 2019-12-12 05:16:45
问题 I have added coordinatorlayout+viewpager+TabLayout and have added three tabs with viewpager but scrolling only works with first tab(recent) not working with two tabs 1. contact,2.setting see all codes only xml code posted here as only needed homeactivity xml(where three fragment get attached) <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com