olibye / androviews Goto Github PK
View Code? Open in Web Editor NEWReplaced by http://goo.gl/FvCq7 Git fork of Eric Taix's Workspace View. A side scrolling ViewGroup based on com.android.launcher.Workspace.java
Replaced by http://goo.gl/FvCq7 Git fork of Eric Taix's Workspace View. A side scrolling ViewGroup based on com.android.launcher.Workspace.java
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();
}
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.
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)
For example, when I am on the middle view and the device rotates, the view goes back to the default, leftmost view. This does not occur with the Android home screen.
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.