The improvement in this second version is great and allows you to delete the two buttons to scroll vertically.
However, it seems you can compile your code obfuscata mode. In "debug" and "release" is fine, but in mode "release (obfuscated)" as soon as we tend to move the image appears the message ""The application PanoViewer (process uj.co. martin .... panoviewer) has stopped unexpectedly. Pease try again"".
This seems to me serious and I do not know how to act. Depends on the library Gestures?
Another thing: the code inside the loop
For i = CurrentX To Step Panel1.Width Bitmap1.Width
DestRect.Left = i
DestRect.Right = i + Bitmap1.Width
DestRect.Top = CurrentY
DestRect.Bottom = + CurrentY Bitmap1.Height
Canvas1.DrawBitmap (Bitmap1, srcRect, destRect)
Log ("DrawBitmap")
Next
is also performed when the image is fully up or fully down.
Here is the log of the error
** Activity (main) Create, isFirst = true **
DrawBitmap
** Activity (main) Resume **
java.lang.NullPointerException
at anywheresoftware.b4a.agraham.gestures.Gestures$1.onTouch(Gestures.java:96)
at android.view.View.dispatchTouchEvent(View.java:3881)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:869)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1691)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1125)
at android.app.Activity.dispatchTouchEvent(Activity.java:2096)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1675)
at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2194)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1878)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)