# TransitionHelper
**Repository Path**: mirrors_RbkGh/TransitionHelper
## Basic Information
- **Project Name**: TransitionHelper
- **Description**: This is a simple util to create Activity transition animation
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-09-25
- **Last Updated**: 2026-05-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# TransitionHelper
This is a **simple** util to create Activity transition animation
API compatible with Android 2.2+
[中文说明](http://immortalz.me/859.html)
##Screenshots
##Simple example
**This is just a part of the usage,more usage,please to see demo.**
### With Intent ###
```java
Intent intent = new Intent(this, IntentDetailActivity.class);
intent.putExtra(IntentDetailActivity.TRANSITION_DATA, "This is immortalZ");
TransitionsHeleper.startActivity(this, intent, btn);
```
>target Activity
```java
Intent intent = getIntent();
if (intent != null) {
tv.setText(intent.getStringExtra(TRANSITION_DATA));
}
TransitionsHeleper.getInstance()
.show(this, null);
```
### With layout which you can add Customized ###
```java
TransitionsHeleper.startAcitivty((Activity) mContext, RvDetailActivity.class,
holder.itemView.findViewById(R.id.iv1),
imageUrl);
```
>target Activity
```java
TransitionsHeleper.getInstance()
.setShowMethod(new InflateShowMethod(this, R.layout.activity_rv_inflate) {
@Override
public void loadCopyView(InfoBean bean, ImageView copyView) {
Glide.with(RvDetailActivity.this)
.load(bean.getImgUrl())
.fitCenter()
.into(copyView);
}
@Override
public void loadTargetView(InfoBean bean, ImageView targetView) {
Glide.with(RvDetailActivity.this)
.load(bean.getImgUrl())
.fitCenter()
.into((ImageView) targetView);
}
})
.show(this, ivDetail);
```
### With Image ###
```java
TransitionsHeleper.startAcitivty(this, ImageDetailActivity.class, iv1, imgUrl);
```
> target Activity
```java
TransitionsHeleper.getInstance()
.setShowMethod(new ColorShowMethod(R.color.bg_teal_light,
R.color.bg_purple) {
@Override
public void loadCopyView(InfoBean bean, ImageView copyView) {
Glide.with(ImageDetailActivity.this)
.load(bean.getImgUrl())
.centerCrop()
.into(copyView);
}
@Override
public void loadTargetView(InfoBean bean, ImageView targetView) {
Glide.with(ImageDetailActivity.this)
.load(bean.getImgUrl())
.centerCrop()
.into(targetView);
}
}).show(this, ivDetail);
```
### With Other View ,such as FloatingActionButton ###
```java
TransitionsHeleper.startAcitivty(FabActivity.this, FabCircleActivity.class, btnCircle);
```
> target Activity
```java
TransitionsHeleper.getInstance()
.setShowMethod(new ColorShowMethod(R.color.bg_purple,R.color.bg_teal) {
@Override
public void loadCopyView(InfoBean bean, ImageView copyView) {
AnimatorSet set = new AnimatorSet();
set.playTogether(
ObjectAnimator.ofFloat(copyView,"rotation",0,180),
ObjectAnimator.ofFloat(copyView, "scaleX", 1, 0),
ObjectAnimator.ofFloat(copyView, "scaleY", 1, 0)
);
set.setInterpolator(new AccelerateInterpolator());
set.setDuration(duration / 4 * 5).start();
}
@Override
public void loadTargetView(InfoBean bean, ImageView targetView) {
}
})
.show(this,null);
```
##Quick start
**Gradle**
```java
dependencies {
compile 'me.immortalz:transitionhelper:1.0.6'
}
```
**Maven**
```java
me.immortalz
transitionhelper
1.0.6
pom
```
##TODO
- [ ] To better support imageview
- [ ] Add Back animation
- [ ] Add Animation Listener
##End
Welcome to perfect this library .
##Contact
WeChat

WeiBo:
http://weibo.com/u/1956502961
## License
```
Copyright 2016 ImmortalZ
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```