1.0.3
Released version 1.0.3
.
What's the difference?
Added TransformationCompat
, TransformationActivity
and TransformationAppCompatActivity
.
We can transform into an Activity easier using them.
How to use?
onTransformationStartContainer
Here is the same as before.
We should add onTransformationStartContainer()
to the Activity that has the floating action button.
override fun onCreate(savedInstanceState: Bundle?) {
onTransformationStartContainer() // should be called before super.onCreate().
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
TransformationAppCompatActivity
Extends TransformationAppCompatActivity
or TransformationActivity
to your activity that will be transformed.
class DetailActivity : TransformationAppCompatActivity()
Here is the Java way.
public class DetailActivity extends TransformationAppCompatActivity
TransformationCompat
And start the DetailActivity
using the TransformationCompat.startActivity
method.
val intent = Intent(context, DetailActivity::class.java)
TransformationCompat.startActivity(transformationLayout, intent)
Here is the Java way.
Intent intent = new Intent(context, DetailActivity.class);
TransformationCompat.INSTANCE.startActivity(transformationLayout, intent);