Friday, 7 July 2017

Translate Animation in between activity or same activity



Translate Animation

 ## For Different Activity 

 => For First Activity (send)

TextView textview1 = findviewby......

Intent intent = new Intent(FirstActivity.this, SecondActivity.class);
ActivityTransitionLauncher.with(FirstActivity.this).from(textview1).launch(intent);

=> FOr second Activity (receive) 

 TextView textview1 = findviewby......

 ExitActivityTransition exitTransition = ActivityTransition.with(getIntent()).to(textview1).start(savedInstanceState);

 if you want same reverse
 exitTransition.exit(GalleryActivity.this);

 ## For Same Activity 

 Textview view1start = findvieby.....
 Textview view2end = findvieby.....

 ActivityTransitionLauncherSameActivity.with(GalleryActivity.this).from(view1start).launch(intentStart);
 ExitActivityTransition exitTransitionChatHead_small = ActivityTransitionSameActivity.with(intentStart).to(view2end).start(null);



Download all classes from below link:-

https://drive.google.com/open?id=0B7De_mE7QNdOczQ4ZjFyQWpBWWs

No comments:

Post a Comment

Run/install/debug Android applications over Wi-Fi ?

Open Teminal/cmd --------------- Below steps is for Android 10 or lower Step 1 - Connect the device via USB and make sure debugging is work...