yalantis / phoenix Goto Github PK
View Code? Open in Web Editor NEWPhoenix Pull-to-Refresh
Home Page: https://yalantis.com/
License: Apache License 2.0
Phoenix Pull-to-Refresh
Home Page: https://yalantis.com/
License: Apache License 2.0
PullToRefreshLayout should be visible only when you start dragging it down. Now it is always visible and I have to set the background of the recyclerView to 100% opacity.
Hi Author,
I have added gradle line in my project.How can i change the circle,sun,Building images with my own images problematically.
can you implement:
1: pull up ,which show need pull up
2:load more, which auto show,can click loadmore and pull up load more
3:multi-fingered pull up and down
thanks !
There some way to check if the pullToRefresh is active/refreshing?
Thanks before and great job anyway!
java.lang.OutOfMemoryError:
at android.graphics.Bitmap.nativeCreate(Native Method:0)
at android.graphics.Bitmap.createBitmap(Bitmap.java:922)
at android.graphics.Bitmap.createBitmap(Bitmap.java:895)
at android.graphics.Bitmap.createBitmap(Bitmap.java:827)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:703)
at com.yalantis.phoenix.refresh_view.SunRefreshView.createBitmaps(SunRefreshView.java:110)
at com.yalantis.phoenix.refresh_view.SunRefreshView.initiateDimens(SunRefreshView.java:102)
at com.yalantis.phoenix.refresh_view.SunRefreshView$1.run(SunRefreshView.java:79)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5433)
at java.lang.reflect.Method.invokeNative(Native Method:0)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method:0)
in eclipse I add all need jar but cant work in my android 4.4 when running
Can I customize the style of loadingview,rather than change the .png of the project
This might be fixed with this PR: #31
If you watch the .gif below, you'll see that I can scroll this ListView down and up if I continue the touch. Once the touch has been lifted from the screen and you swipe down it starts show the refresh view. Normal behavior should not show this unless at the top of the ListView.
Was this by design?
If i try to scroll up from the bottom of the list, it pulls the refresh view instead of scrolling up. Please fix it asap.
There is no way to setProgressViewOffset(boolean scale, int start, int end) like for SwipeRefreshLayout.
i have a problem when try to scroll up as the screenshot
<com.yalantis.phoenix.PullToRefreshView
android:id="@+id/pull_to_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/home_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<View
android:id="@+id/home_empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/home"
android:clickable="false"
android:visibility="gone"
/>
</RelativeLayout>
</com.yalantis.phoenix.PullToRefreshView>
</RelativeLayout>
`
java.lang.OutOfMemoryError
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:822)
at android.graphics.Bitmap.createBitmap(Bitmap.java:799)
at android.graphics.Bitmap.createBitmap(Bitmap.java:731)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:607)
at com.yzm.sleep.sunrefresh.SunRefreshView.createBitmaps(SunRefreshView.java:109)
at com.yzm.sleep.sunrefresh.SunRefreshView.initiateDimens(SunRefreshView.java:103)
at com.yzm.sleep.sunrefresh.SunRefreshView$1.run(SunRefreshView.java:80)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5049)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
Is it possible to change the graphics programatically? I want to build via gradle...
I've noticed that you handle bottom padding in scroll back. That would cause much time in "measure".
I catched a systrace of your "scroll back":
I understand why you need this logic, View.offsetTopAndBottom
would destroy the bottom padding. But this not handled in scroll down yet. Actually, you can notify user to set padding in parent layout such as following code, and handle padding logic in onLayout()
of PullToRefreshView
.
<com.yalantis.phoenix.PullToRefreshView
android:id="@+id/pull_to_refresh"
android:padding="10dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/yalantis_list_view"
android:divider="@null"
android:dividerHeight="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.yalantis.phoenix.PullToRefreshView>
Thank you for a nice tool! if it has a function with pull-up-load-more, It will be perfect! I am looking forward it! Thanks again!
I create a hbase table use create 'pay_psa_info6',{NAME=>'cf'}
then load data which exported from online use the shell hbase org.apache.hadoop.hbase.mapreduce.Import pay_psa_info6 /tmp/part-m-00000
then I create view CREATE VIEW "pay_psa_info6" (pk VARCHAR PRIMARY KEY, "cf"."c" integer);
select * from pay_psa_info6;
Error: ERROR 1012 (42M03): Table undefined. tableName=PAY_PSA_INFO6 (state=42M03,code=1012)
org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=PAY_PSA_INFO6
at org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:577)
at org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.(FromCompiler.java:391)
at org.apache.phoenix.compile.FromCompiler.getResolverForQuery(FromCompiler.java:228)
at org.apache.phoenix.compile.FromCompiler.getResolverForQuery(FromCompiler.java:206)
at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:482)
at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:456)
at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:302)
at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:291)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:290)
at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:283)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1830)
at sqlline.Commands.execute(Commands.java:822)
at sqlline.Commands.sql(Commands.java:732)
at sqlline.SqlLine.dispatch(SqlLine.java:813)
at sqlline.SqlLine.begin(SqlLine.java:686)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:291)
I'm using pull-to-refresh-rentals with observable scroll view (https://github.com/ksoichiro/Android-ObservableScrollView) in my application (the code is almost identical to the StickyHeaderListView sample code in observable-scrollview source code). However the pull to refresh image (the sky and building) gets covered by the toolbars provided by observablescrollview.
I've played a lot with the padding and layout-margintop of pull-to-refresh but it seems that there is no decent solution for this. I tried to use some code trick to add and remove layout-margin top to pull to refresh but it leads to strange not smooth behavior. Another not-so-good solution is to set the setVisibility of toolbars to VISIBILITY.GONE in onRefresh() but not a very good solution.
I attached a screenshot of the problem during the pull to refresh action. You can see the two redundant big white spaces (white spaces beneath the toolbars appear during pull to refresh) and also the pictures are covered by toolbars.
I was wondering if there is a way to make these two libraries work together in peace :)
if I set the pulltorefreshview GONE in the onCreate. the sunrefreshview will not been init!
I have an error.
this method undetected.
can you help me?
Hello, is it possible to disable it programatically,because i want it to be active only when specific view is touched and not the rest of the layout?
Thanks in advance :)
Great lib btw !
The Refresh Animation will make other widget's location changed.Now I find it will make the bitWheel shape changed when refreshing.
When using your library, even with very small images after a while I always get OOM errors
I'm not sure, which exactly, but I can't even sync gradle with this lib. Debug values contains following code
<declare-styleable name="LiveLockScreen"><attr format="string" name="settingsActivity"/><attr name="type">
<flag name="experience" value="1"/>
<flag name="event" value="2"/>
</attr></declare-styleable>
after activity created, then
mPullToRefreshView.triggerPullToRrefersh();
java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:575)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:410)
at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:433)
at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:463)
at com.yalantis.phoenix.refresh_view.SunRefreshView.createBitmaps(SunRefreshView.java:108)
at com.yalantis.phoenix.refresh_view.SunRefreshView.initiateDimens(SunRefreshView.java:104)
at com.yalantis.phoenix.refresh_view.SunRefreshView$1.run(SunRefreshView.java:81)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5062)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
at dalvik.system.NativeStart.main(Native Method)
基本信息
首次发生时间 最近发生时间 出现次数 版本
2015-11-20 16:16:21 2015-11-24 18:49:33 573 2.2
When I add a sun.png, I get the error Duplicate file.
\app\build\intermediates\res\debug\drawable-xxhdpi\sun.png: Original is here. The version qualifier may be implied.
I assume, I would need to set the merger to use my project's sun.png, but not sure how to do it.
I added Phoenix to my project and it works fine with Sony Xperia. However, I can't scroll to refresh when testing my app on Samsung Galaxy S2. Do you have similar issue on that device? What might be the problem?
i have copied your SunRefreshView and made my own with my own icons
in most of the devices is workin ok but in some samsung devices and some sony i am getting this error:
ava.lang.NullPointerException
at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1083)
at android.view.GLES20Canvas.drawBitmap(GLES20Canvas.java:827)
at com.yalantis.phoenix.refresh_view.LoadingRefreshView.drawSun(LoadingRefreshView.java:213)
at com.yalantis.phoenix.refresh_view.LoadingRefreshView.draw(LoadingRefreshView.java:156)
at android.widget.ImageView.onDraw(ImageView.java:1040)
at android.view.View.draw(View.java:15400)
at android.view.View.getDisplayList(View.java:14294)
at android.view.View.getDisplayList(View.java:14336)
at android.view.View.draw(View.java:15114)
at android.view.ViewGroup.drawChild(ViewGroup.java:3319)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3162)
at android.view.View.draw(View.java:15403)
at android.view.View.getDisplayList(View.java:14294)
at android.view.View.getDisplayList(View.java:14336)
at android.view.View.draw(View.java:15114)
at android.view.ViewGroup.drawChild(ViewGroup.java:3319)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3155)
at android.view.View.draw(View.java:15403)
at android.view.View.getDisplayList(View.java:14294)
at android.view.View.getDisplayList(View.java:14336)
at android.view.View.draw(View.java:15114)
at android.view.ViewGroup.drawChild(ViewGroup.java:3319)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3155)
at android.view.View.draw(View.java:15403)
at android.support.v4.view.ViewPager.draw(ViewPager.java:2257)
at android.view.View.getDisplayList(View.java:14294)
at android.view.View.getDisplayList(View.java:14336)
at android.view.View.draw(View.java:15114)
at android.view.ViewGroup.drawChild(ViewGroup.java:3319)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3155)
at android.view.View.getDisplayList(View.java:14289)
at android.view.View.getDisplayList(View.java:14336)
at android.view.View.draw(View.java:15114)
at android.view.ViewGroup.drawChild(ViewGroup.java:3319)
at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:1089)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3155)
at android.view.View.getDisplayList(View.java:14289)
at android.view.View.getDisplayList(View.java:14336)
at android.view.View.draw(View.java:15114)
at android.view.ViewGroup.drawChild(ViewGroup.java:3319)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3155)
at android.view.View.getDisplayList(View.java:14289)
at android.view.View.getDisplayList(View.java:14336)
at android.view.View.draw(View.java:15114)
at android.view.ViewGroup.drawChild(ViewGroup.java:3319)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3155)
at android.view.View.getDisplayList(View.java:14289)
at android.view.View.getDisplayList(View.java:14336)
at android.view.View.draw(View.java:15114)
at android.view.ViewGroup.drawChild(ViewGroup.java:3319)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3155)
at android.view.View.draw(View.java:15403)
at android.widget.FrameLayout.draw(FrameLayout.java:472)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2583)
at android.view.View.getDisplayList(View.java:14294)
at android.view.View.getDisplayList(View.java:14336)
at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1585)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1457)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2779)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2645)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2213)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1256)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6632)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:813)
at android.view.Choreographer.doCallbacks(Choreographer.java:613)
at android.view.Choreographer.doFrame(Choreographer.java:583)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:799)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5598)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
hi how can i put the sun in the center?
I set padding top and padding bottom to the list view and the padding disappears after refresh. I want to set clipToPadding of the listview to false, so moving the padding to PullToRefreshView will not work in my case.
with viewpager
<com.yalantis.phoenix.PullToRefreshView
android:id="@+id/pull_to_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.yalantis.phoenix.PullToRefreshView>
If I use the library like this, it can't pull to refresh, how can I do it ?
Hi,
This may be a very dumb question but I don't understand where we are supposed to change the images to customise it with our own?
When I use Recycler in PullToRefresh, by calling smoothScrollToPosition(0) a strange behavior occurred.
When Recycler is exactly at the top of the first cell, it scrolls to the bottom of it otherwise, it scrolls to the top of the first cell!
It just happened when I use PullToRefresh!
when I need load more?,the code how to write?
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.