Comments (5)
That's really weird, can you check it with the sample? I'll try to find SG S2 to test it myself, but not about the ETA
from phoenix.
I tested sample and it works fine on S2. However, I am using a custom ScrollView as following with Phoenix and Phoenix doesnt work on S2 in that case but works fine with Sony Xperia. Do you have any idea what might be the problem?
import android.content.Context;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ScrollView;
public class VerticalScrollView extends ScrollView
{
private GestureDetector mGestureDetector;
View.OnTouchListener mGestureListener;
public VerticalScrollView(Context context)
{
super(context);
init(context);
}
public VerticalScrollView(Context context, AttributeSet attrs)
{
super(context, attrs);
init(context);
}
public VerticalScrollView(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);
init(context);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev)
{
return super.onInterceptTouchEvent(ev) && mGestureDetector.onTouchEvent(ev);
}
class YScrollDetector extends GestureDetector.SimpleOnGestureListener
{
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
{
return Math.abs(distanceY) > Math.abs(distanceX);
}
}
private void init(Context context)
{
mGestureDetector = new GestureDetector(context, new YScrollDetector());
setFadingEdgeLength(0);
}
}
And my layout goes like this:
<com.test.project.ui.VerticalScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
< <com.yalantis.phoenix.PullToRefreshView
android:id="@+id/pull_to_refresh"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"> ....
from phoenix.
Well, maybe that's because LinearLayout under the PullToRefreshView layout. It needs subclass of AbsListView or anything that can scroll.
from phoenix.
I put scrollview into pulltorefresh and now it works on S2. Thank you, @shliama.
from phoenix.
great
from phoenix.
Related Issues (20)
- can I use this library like this? HOT 2
- how can i trigger pull-to-refresh programmably? HOT 2
- How are you supposed to change the images, sun, buildings, sky? HOT 12
- Out of Memory errors HOT 2
- Change sun,circle ,buildings images programatically HOT 5
- The refreshing view is uninited HOT 2
- check if the pullToRefresh is active/refreshing HOT 1
- Scroll doesn't work with complex layouts HOT 3
- problem when scrolling up HOT 4
- Resource name "type" conflicts with other lib HOT 4
- Can I change the .png of the background and the sun programatically? HOT 4
- Recycler smoothScrollToPosition has a strange behavior
- Issue with GridView. Is this library supposed to work with GridView?
- Issue with RecyclerView. Is this library supposed to work with RecyclerView?
- Can I customize the style of loadingview
- OutOfMemoryError HOT 1
- Pull to left or right and show icon from left or right
- How can i disable it programatically? HOT 3
- The Refresh Animation will make other widget's location changed
- Create view success ,but got a TableNotFoundException when query HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phoenix.