Giter Club home page Giter Club logo

androviews's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

androviews's Issues

[Contains Fix] SetCurrentScreen doesn't work

Private property currentScreen is not getting set because name collision:

    public void setCurrentScreen(int currentScreen) {

        if (!scroller.isFinished()) scroller.abortAnimation();
        currentScreen = Math.max(0, Math.min(currentScreen, getChildCount()));
        scrollTo(currentScreen * getWidth(), 0);
        Log.d("workspace", "setCurrentScreen: width is " + getWidth());
        invalidate();
    }

Change it to this:

   public void setCurrentScreen(int argCurrentScreen) {

        if (!scroller.isFinished()) scroller.abortAnimation();
        currentScreen = Math.max(0, Math.min(argCurrentScreen, getChildCount()));
        scrollTo(currentScreen * getWidth(), 0);
        Log.d("workspace", "setCurrentScreen: width is " + getWidth());
        invalidate();
    }

Crashes when tapping with more fingers

WorkspaceView crashes when tapping very fast one child window.

To reproduce tap the screen fast using at least two o three fingers, (first with the index finger, then with the second finger, then with the third finger).

I haven't been able to reproduce the issue with just 1 finger, and with two it is difficult to reproduce (at least on a fast smartphone). With three fingers is pretty easy though.

Full stacktrace:

27782 workspace D Intercepted a touch event
27782 MotionEvent V ArrayIndexOutOfBoundsException!!! pointerIndex -1; i -4
27782 AndroidRuntime D Shutting down VM
27782 dalvikvm W threadid=1: thread exiting with uncaught exception (group=0x40025a70)
AndroidRuntime E FATAL EXCEPTION: main
27490 AndroidRuntime E java.lang.ArrayIndexOutOfBoundsException
27490 AndroidRuntime E at android.view.MotionEvent.getX(MotionEvent.java:783)
27490 AndroidRuntime E at org.jared.commons.ui.WorkspaceView.handleInterceptMove(WorkspaceView.java:497)
27490 AndroidRuntime E at org.jared.commons.ui.WorkspaceView.onInterceptTouchEvent(WorkspaceView.java:453)
27490 AndroidRuntime E at org.jared.commons.ui.WorkspaceView.onTouchEvent(WorkspaceView.java:592)
27490 AndroidRuntime E at android.view.View.dispatchTouchEvent(View.java:3778)
27490 AndroidRuntime E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:919)
27490 AndroidRuntime E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:958)
27490 AndroidRuntime E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:958)
27490 AndroidRuntime E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:958)
27490 AndroidRuntime E at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1716)
27490 AndroidRuntime E at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1124)
27490 AndroidRuntime E at android.app.Activity.dispatchTouchEvent(Activity.java:2125)
27490 AndroidRuntime E at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1700)
27490 AndroidRuntime E at android.view.ViewRoot.handleMessage(ViewRoot.java:1802)
27490 AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:99)
27490 AndroidRuntime E at android.os.Looper.loop(Looper.java:143)
27490 AndroidRuntime E at android.app.ActivityThread.main(ActivityThread.java:5068)
27490 AndroidRuntime E at java.lang.reflect.Method.invokeNative(Native Method)
27490 AndroidRuntime E at java.lang.reflect.Method.invoke(Method.java:521)
27490 AndroidRuntime E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
27490 AndroidRuntime E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
27490 AndroidRuntime E at dalvik.system.NativeStart.main(Native Method)

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.