Android Question makeClipRevealAnimation

Akwa

Member
Licensed User
Hello,

I want to use an animation between activities, using makeClipRevealAnimation. Unfortunately, Java and Android libs are real bullshit and totally beyond understanding...
All I succeed to do is
B4X:
Dim jo As JavaObject
jo.InitializeContext
Dim ao As JavaObject = jo.InitializeStatic("android.app.ActivityOptions")
Dim sao As JavaObject = ao.RunMethodJO("makeClipRevealAnimation", Array As Object(Activity.GetView(0), Activity.Width, 0, Activity.Width, Activity.Height))

As far as I know, i have to do a thing like that with B4A :
Java:
public static void startActivityWithClipReveal(Context context, Class landingActivity, View view) {
    Intent intent = new Intent(context, landingActivity);
    ActivityOptions options = null;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        options = ActivityOptions.makeClipRevealAnimation(view, 0, 0,
                view.getWidth(), view.getHeight());
        context.startActivity(intent, options.toBundle());
    } else {
        context.startActivity(intent);
    }
}

Thanks
 
Top