Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
It worked for me hardly. Intent intent = new Intent(Activity.this, SecondActivity.class); ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Activity.this); startActivity(int...
Answer
#4: Post edited
- It worked for me hardly.
- ```java
- Intent intent = new Intent(Activity.this, SecondActivity.class);
- ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Activity.this);
- startActivity(intent, options.toBundle());
- ```
- According to [the answer](https://stackoverflow.com/a/8983437/16897106), R.anim was available from API level 1 and above.
- According to [the answer](https://stackoverflow.com/a/3389916/16897106), `overridePendingTransistion` was available from Android version 2.0 and above. 2.0 is called Eclair as an android app developer I will call it E (API level is 5).
- According to [the answer](https://stackoverflow.com/a/33924235/16897106), ` ActivityCompat.startActivity()` works for API level 22 and above.
- And, answer of the code is available [here](https://stackoverflow.com/a/46079327/16897106)
In the code written above, options is making transition and when I had added it to `startActivity` then, when changing the activity; it was sending transition animation with intent.
- It worked for me hardly.
- ```java
- Intent intent = new Intent(Activity.this, SecondActivity.class);
- ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Activity.this);
- startActivity(intent, options.toBundle());
- ```
- According to [the answer](https://stackoverflow.com/a/8983437/16897106), R.anim was available from API level 1 and above.
- According to [the answer](https://stackoverflow.com/a/3389916/16897106), `overridePendingTransistion` was available from Android version 2.0 and above. 2.0 is called Eclair as an android app developer I will call it E (API level is 5).
- According to [the answer](https://stackoverflow.com/a/33924235/16897106), ` ActivityCompat.startActivity()` works for API level 22 and above.
- And, answer of the code is available [here](https://stackoverflow.com/a/46079327/16897106)
- In the code written above, options is making transition and when I had added it to `startActivity` then, when changing the activity; it was sending transition animation with intent.
- <h2>For custom transition :</h2>
- ```java
- Intent i = new Intent(Activity.this, SecondActivity.class);
- ActivityOptions options = ActivityOptions.makeCustomAnimation(Activity.this, R.anim.fade, R.anim.fade_out);
- startActivity(i,options.toBundle());
- ```
#3: Post edited
- It worked for me hardly.
- ```java
- Intent intent = new Intent(Activity.this, SecondActivity.class);
- ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Activity.this);
- startActivity(intent, options.toBundle());
- ```
- According to [the answer](https://stackoverflow.com/a/8983437/16897106), R.anim was available from API level 1 and above.
- According to [the answer](https://stackoverflow.com/a/3389916/16897106), `overridePendingTransistion` was available from Android version 2.0 and above. 2.0 is called Eclair as an android app developer I will call it E (API level is 5).
- According to [the answer](https://stackoverflow.com/a/33924235/16897106), ` ActivityCompat.startActivity()` works for API level 22 and above.
And, answer of the code is available [here](https://stackoverflow.com/a/46079327/16897106)
- It worked for me hardly.
- ```java
- Intent intent = new Intent(Activity.this, SecondActivity.class);
- ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Activity.this);
- startActivity(intent, options.toBundle());
- ```
- According to [the answer](https://stackoverflow.com/a/8983437/16897106), R.anim was available from API level 1 and above.
- According to [the answer](https://stackoverflow.com/a/3389916/16897106), `overridePendingTransistion` was available from Android version 2.0 and above. 2.0 is called Eclair as an android app developer I will call it E (API level is 5).
- According to [the answer](https://stackoverflow.com/a/33924235/16897106), ` ActivityCompat.startActivity()` works for API level 22 and above.
- And, answer of the code is available [here](https://stackoverflow.com/a/46079327/16897106)
- In the code written above, options is making transition and when I had added it to `startActivity` then, when changing the activity; it was sending transition animation with intent.
#2: Post edited
- It worked for me hardly.
- ```java
- Intent intent = new Intent(Activity.this, SecondActivity.class);
- ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Activity.this);
- startActivity(intent, options.toBundle());
```
- It worked for me hardly.
- ```java
- Intent intent = new Intent(Activity.this, SecondActivity.class);
- ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(Activity.this);
- startActivity(intent, options.toBundle());
- ```
- According to [the answer](https://stackoverflow.com/a/8983437/16897106), R.anim was available from API level 1 and above.
- According to [the answer](https://stackoverflow.com/a/3389916/16897106), `overridePendingTransistion` was available from Android version 2.0 and above. 2.0 is called Eclair as an android app developer I will call it E (API level is 5).
- According to [the answer](https://stackoverflow.com/a/33924235/16897106), ` ActivityCompat.startActivity()` works for API level 22 and above.
- And, answer of the code is available [here](https://stackoverflow.com/a/46079327/16897106)