File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ Also, read how it was done in [our blog](https://yalantis.com/blog/star-wars-the
1919##Usage
2020
2121Wrap your fragment or activity main view in TilesFrameLayout:
22- ```
22+ ``` xml
2323<com .yalantis.starwars.TilesFrameLayout
2424 android : id =" @+id/tiles_frame_layout"
2525 android : layout_height =" match_parent"
@@ -34,15 +34,15 @@ Wrap your fragment or activity main view in TilesFrameLayout:
3434
3535
3636Adjust animation with these parameters:
37- ``` app:sw_animationDuration ``` – duration in milliseconds
38- ``` app:sw_numberOfTilesX ``` – the number of square tiles the plane is tessellated into broadwise
37+ - ``` app:sw_animationDuration ``` – duration in milliseconds
38+ - ``` app:sw_numberOfTilesX ``` – the number of square tiles the plane is tessellated into broadwise
3939
40- ```
40+ ``` java
4141mTilesFrameLayout = (TilesFrameLayout ) findViewById(R . id. tiles_frame);
4242mTilesFrameLayout. setOnAnimationFinishedListener(this );
4343```
4444In your activity or fragment’s onPause() and onResume() it’s important to call the corresponding methods:
45- ```
45+ ``` java
4646@Override
4747public void onResume() {
4848 super . onResume();
@@ -56,11 +56,11 @@ public void onPause() {
5656}
5757```
5858To start the animation simply call:
59- ```
59+ ``` java
6060mTilesFrameLayout. startAnimation();
6161```
6262Your callback will be called when the animation ends:
63- ```
63+ ``` java
6464@Override
6565public void onAnimationFinished() {
6666 // Hide or remove your view/fragment/activity here
You can’t perform that action at this time.
0 commit comments