Makecaleupanimation of appwidget

Some applications use makeScaleUpAnimation (introduced in JellyBean 4.1) when starting an action from a widget. How is this possible if you cannot get a presentation from the widget provider?

Is it possible to view the entire view of the application or something else? I can not find a solution.

ActivityOptions opts = ActivityOptions.makeScaleUpAnimation(view, 0, 0, view.getWidth(), view.getHeight()); // Request the activity be started, using the custom animation options. startActivity(new Intent(MainActivity.this, AnimationActivity.class), opts.toBundle()); 

I open sms inbox from my widget

 Intent inboxIntent = new Intent(Intent.ACTION_MAIN); inboxIntent.setType("vnd.android-dir/mms-sms"); int flags = Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP; inboxIntent.setFlags(flags); context.startActivity(inboxIntent); 
+4
source share
1 answer

To get this information, your function must call getIntent().getSourceBounds() .

+4
source

Source: https://habr.com/ru/post/1494312/


All Articles