B4A Library Amir_ZoomHelper

User242424

Member
Licensed User
Hello World!
Another B4A Library that makes any view to be zoomable. šŸ¤©


Amir_ZoomHelper


Usage :
B4X:
Private ZoomHelper As Amir_ZoomHelper
ZoomHelper.Initialize("ZoomHelper",Activity)
ZoomHelper.SetViewZoomable(View,True)
And you should add this java code to your activity :
B4X:
#if java
import com.aghajari.zoom.Amir_ZoomHelper;
import android.view.MotionEvent;

@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
    return Amir_ZoomHelper.onDispatchTouchEvent(ev) || super.dispatchTouchEvent(ev);
}
#End If
Events :
B4X:
'Initialize Event
Sub ZoomHelper_onZoomStateChanged (ZoomableView As View,IsZooming As Boolean)

ZoomHelper.SetDoubleClickListener("ZoomHelperClick",Image,200)
Sub ZoomHelperClick_DoubleClick
Customize :
B4X:
ZoomHelper.ShadowColor = Colors.Black
ZoomHelper.AlphaFactory = 6
ZoomHelper.MinScale = 1.0f
ZoomHelper.MaxScale = -1 'Unlimited
ZoomHelper.DialogThemeName = "Theme.AppCompat.Translucent"
'set view tags (you may need this when you are using zoom in lists)
ZoomHelper.SetViewTag(View,Tag)
Log(ZoomHelper.GetViewTag(View))

Works fine with Amir_RecyclerView!
check out RecyclerView Sample!

Lib+Sample attached :)
 

Attachments

Top