Giter VIP home page Giter VIP logo

Comments (5)

shliama avatar shliama commented on May 26, 2024

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.

figengungor avatar figengungor commented on May 26, 2024

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.

shliama avatar shliama commented on May 26, 2024

Well, maybe that's because LinearLayout under the PullToRefreshView layout. It needs subclass of AbsListView or anything that can scroll.

from phoenix.

figengungor avatar figengungor commented on May 26, 2024

I put scrollview into pulltorefresh and now it works on S2. Thank you, @shliama.

from phoenix.

shliama avatar shliama commented on May 26, 2024

great 👍 guess, the issue is closed now)

from phoenix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.