[
  {
    "path": ".gitignore",
    "content": "# built application files\n*.apk\n*.ap_\n\n# files for the dex VM\n*.dex\n\n# Java class files\n*.class\n\n# generated files\nbin/\ngen/\ngen-external-apklibs/\n\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# intellij & maven\n.classpath\n.project\n.settings/\n.idea/\n*.iml\n*.iws\n.DS_Store\nlog/\ntarget/\ntmp/\nout/\n\n# Gradle\n.gradle\nbuild/**\nlibraries/build/**\n"
  },
  {
    "path": "LICENSE.md",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Luis G. Valle\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# UNMAINTAINED\nNo maintainance is intended. \nThe content is still valid as a reference but it won't contain the latest new stuff\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Material--Animations-brightgreen.svg?style=flat)](http://android-arsenal.com/details/3/1880)\n\n[Android Transition Framework][transition-framework] can be used for **three** main things:\n\n1. Animate activity layout content when transitioning from one activity to another.\n2. Animate shared elements (Hero views) in transitions between activities.\n3. Animate view changes within same activity.\n\n\n## 1. Transitions between Activities\n\nAnimate existing activity layout **content**\n\n![A Start B][transition_a_to_b]\n\nWhen transitioning from `Activity A` to `Activity B` content layout is animated according to defined transition. There are three predefined transitions available on `android.transition.Transition` you can use: **Explode**, **Slide** and **Fade**. \nAll these transitions track changes to the visibility of target views in activity layout and animate those views to follow transition rules.\n\n[Explode][explode_link] | [Slide][slide_link] | [Fade][fade_link]\n--- | --- | ---\n![transition_explode] | ![transition_slide] | ![transition_fade]\n\n\nYou can define these transitions **declarative** using XML or **programmatically**. For the Fade Transition sample, it would look like this:\n\n### Declarative\nTransitions are defined on XML files in `res/transition`\n\n> res/transition/activity_fade.xml\n\n```xml\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<fade xmlns:android=\"http://schemas.android.com/apk/res/\"\n    android:duration=\"1000\"/>\n\n```\n\n> res/transition/activity_slide.xml\n\n```xml\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<slide xmlns:android=\"http://schemas.android.com/apk/res/\"\n    android:duration=\"1000\"/>\n\n```\n\nTo use these transitions you need to inflate them using `TransitionInflater`\n\n> MainActivity.java\n \n```java\n\t@Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_transition);\n        setupWindowAnimations();\n    }\n\n    private void setupWindowAnimations() {\n        Slide slide = TransitionInflater.from(this).inflateTransition(R.transition.activity_slide);\n        getWindow().setExitTransition(slide);\n    }\n\n```\n\n> TransitionActivity.java\n \n```java\n\t@Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_transition);\n        setupWindowAnimations();\n    }\n\n    private void setupWindowAnimations() {\n        Fade fade = TransitionInflater.from(this).inflateTransition(R.transition.activity_fade);\n        getWindow().setEnterTransition(fade);\n    }\n\n```\n\n### Programmatically \n\n> MainActivity.java\n \n```java\n\t@Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_transition);\n        setupWindowAnimations();\n    }\n\n    private void setupWindowAnimations() {\n        Slide slide = new Slide();\n        slide.setDuration(1000);\n        getWindow().setExitTransition(slide);\n    }\n\n```\n\n> TransitionActivity.java\n \n```java\n\t@Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_transition);\n        setupWindowAnimations();\n    }\n\n    private void setupWindowAnimations() {\n        Fade fade = new Fade();\n        fade.setDuration(1000);\n        getWindow().setEnterTransition(fade);\n    }\n\n```\n\n#### Any of those produce this result:\n\n![transition_fade]\n\n\n### What is happening step by step:\n\n1. Activity A starts Activity B\n\n2. Transition Framework finds A Exit Transition (slide) and apply it to all visible views.\n3. Transition Framework finds B Enter Transition (fade) and apply it to all visible views.\n4. **On Back Pressed** Transition Framework executes Enter and Exit reverse animations respectively (If we had defined output `returnTransition` and `reenterTransition`, these have been executed instead) \n\n### ReturnTransition & ReenterTransition\n\nReturn and Reenter Transitions are the reverse animations for Enter and Exit respectively.\n\n  * EnterTransition <--> ReturnTransition\n  * ExitTransition <--> ReenterTransition\n\nIf Return or Reenter are not defined, Android will execute a reversed version of Enter and Exit Transitions. But if you do define them, you can have different transitions for entering and exiting an activity.\n\n![b back a][transition_b_to_a]\n\nWe can modify previous Fade sample and define a `ReturnTransition` for `TransitionActivity`, in this case, a **Slide** transition. This way, when returning from B to A, instead of seeing a Fade out (reversed Enter Transition) we will see a **Slide out** transition\n \n> TransitionActivity.java\n \n```java\n\t@Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_transition);\n        setupWindowAnimations();\n    }\n\n    private void setupWindowAnimations() {\n        Fade fade = new Fade();\n        fade.setDuration(1000);\n        getWindow().setEnterTransition(fade);\n        \n        Slide slide = new Slide();\n        slide.setDuration(1000);\n        getWindow().setReturnTransition(slide);        \n    }\n\n```\n\n\nObserve that if no Return Transition is defined then a reversed Enter Transition is executed.\nIf a Return Transition is defined that one is executed instead. \n\nWithout Return Transition | With Return Transition \n--- | --- \nEnter: `Fade In` | Enter: `Fade In`\nExit: `Fade Out` | Exit: `Slide out`\n![transition_fade] | ![transition_fade2] \n\n\n## 2. Shared elements between Activities\n\nThe idea behind this is having two different views in two different layouts and link them somehow with an animation.\n\nTransition framework will then do _whatever animations it consider necessary_ to show the user a transition from one view to another.\n\nKeep this always in mind: the view **is not really moving** from one layout to another. They are two independent views.\n\n\n![A Start B with shared][shared_element]\n\n\n### a) Enable Window Content Transition\n\nThis is something you need to set up once on your app `styles.xml`.\n\n> values/styles.xml\n\n```xml\n<style name=\"MaterialAnimations\" parent=\"@style/Theme.AppCompat.Light.NoActionBar\">\n    ...\n    <item name=\"android:windowContentTransitions\">true</item\n    ...\n</style>\n```\n\nHere you can also specify default enter, exit and shared element transitions for the whole app if you want\n\n```xml\n<style name=\"MaterialAnimations\" parent=\"@style/Theme.AppCompat.Light.NoActionBar\">\n    ...\n    <!-- specify enter and exit transitions -->\n    <item name=\"android:windowEnterTransition\">@transition/explode</item>\n    <item name=\"android:windowExitTransition\">@transition/explode</item>\n\n    <!-- specify shared element transitions -->\n    <item name=\"android:windowSharedElementEnterTransition\">@transition/changebounds</item>\n    <item name=\"android:windowSharedElementExitTransition\">@transition/changebounds</item>\n    ...\n</style>\n```\n\n\n\n### b) Define a common transition name\n\nTo make the trick you need to give both, origin and target views, the same **`android:transitionName`**. They may have different ids or properties, but `android:transitionName` must be the same.\n\n> layout/activity_a.xml\n\n```xml\n<ImageView\n        android:id=\"@+id/small_blue_icon\"\n        style=\"@style/MaterialAnimations.Icon.Small\"\n        android:src=\"@drawable/circle\"\n        android:transitionName=\"@string/blue_name\" />\n```\n\n> layout/activity_b.xml\n\n```xml\n<ImageView\n        android:id=\"@+id/big_blue_icon\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:src=\"@drawable/circle\"\n        android:transitionName=\"@string/blue_name\" />\n```\n\n### c) Start an activity with a shared element \n\nUse the `ActivityOptions.makeSceneTransitionAnimation()` method to define shared element origin view and transition name.\n\n> MainActivity.java\n\n```java\n\nblueIconImageView.setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View v) {\n        Intent i = new Intent(MainActivity.this, SharedElementActivity.class);\n\n        View sharedView = blueIconImageView;\n        String transitionName = getString(R.string.blue_name);\n\n        ActivityOptions transitionActivityOptions = ActivityOptions.makeSceneTransitionAnimation(MainActivity.this, sharedView, transitionName);\n        startActivity(i, transitionActivityOptions.toBundle());\n    }\n});\n\n```\n\n\nJust that code will produce this beautiful transition animation:\n\n![a to b with shared element][shared_element_anim]\n\nAs you can see, Transition framework is creating and executing an animation to create the illusion that views are moving and changing shape from one activity to the other\n\n## Shared elements between fragments\n\nShared element transition works with Fragments in a very similar way as it does with activities. \n\nSteps **a)** and **b)** are exactly the **same**. Only **c)** changes\t\t\t\n\n### a) Enable Window Content Transition\n\n> values/styles.xml\n\n```xml\n<style name=\"MaterialAnimations\" parent=\"@style/Theme.AppCompat.Light.NoActionBar\">\n    ...\n    <item name=\"android:windowContentTransitions\">true</item>\n    ...\n</style>\n```\n\n### b) Define a common transition name\n\n> layout/fragment_a.xml\n\n```xml\n<ImageView\n        android:id=\"@+id/small_blue_icon\"\n        style=\"@style/MaterialAnimations.Icon.Small\"\n        android:src=\"@drawable/circle\"\n        android:transitionName=\"@string/blue_name\" />\n```\n\n> layout/fragment_b.xml\n\n```xml\n<ImageView\n        android:id=\"@+id/big_blue_icon\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:src=\"@drawable/circle\"\n        android:transitionName=\"@string/blue_name\" />\n```\n\n###  c) Start a fragment with a shared element\n\nTo do this you need to include shared element transition information as part of the **`FragmentTransaction`** process.\n\n```java\nFragmentB fragmentB = FragmentB.newInstance(sample);\n\n// Defines enter transition for all fragment views\nSlide slideTransition = new Slide(Gravity.RIGHT);\nslideTransition.setDuration(1000);\nsharedElementFragment2.setEnterTransition(slideTransition);\n\n// Defines enter transition only for shared element\nChangeBounds changeBoundsTransition = TransitionInflater.from(this).inflateTransition(R.transition.change_bounds);\nfragmentB.setSharedElementEnterTransition(changeBoundsTransition);\n\ngetFragmentManager().beginTransaction()\n        .replace(R.id.content, fragmentB)\n        .addSharedElement(blueView, getString(R.string.blue_name))\n        .commit();\n```\n\nAnd this is the final result:\n\n![shared_element_no_overlap]\n\n## Allow Transition Overlap\n\nYou can define if enter and exit transitions can overlap each other. \n\nFrom [Android documentation](http://developer.android.com/intl/ko/reference/android/app/Fragment.html#getAllowEnterTransitionOverlap()):\n> When **true**, the enter transition will start as soon as possible. \n> \n> When **false**, the enter transition will wait until the exit transition completes before starting.\n\nThis works for both Fragments and Activities shared element transitions.\n\n```java\nFragmentB fragmentB = FragmentB.newInstance(sample);\n\n// Defines enter transition for all fragment views\nSlide slideTransition = new Slide(Gravity.RIGHT);\nslideTransition.setDuration(1000);\nsharedElementFragment2.setEnterTransition(slideTransition);\n\n// Defines enter transition only for shared element\nChangeBounds changeBoundsTransition = TransitionInflater.from(this).inflateTransition(R.transition.change_bounds);\nfragmentB.setSharedElementEnterTransition(changeBoundsTransition);\n\n// Prevent transitions for overlapping\nfragmentB.setAllowEnterTransitionOverlap(overlap);\nfragmentB.setAllowReturnTransitionOverlap(overlap);\n\ngetFragmentManager().beginTransaction()\n        .replace(R.id.content, fragmentB)\n        .addSharedElement(blueView, getString(R.string.blue_name))\n        .commit();\n```\n\nIt is very easy to spot the difference in this example:\n\nOverlap True | Overlap False\n--- | --- \nFragment_2 appears on top of Fragment_1 | Fragment_2 waits until Fragment_1 is gone\n![shared_element_overlap] | ![shared_element_no_overlap]\n \n\n\n## 3. Animate view layout elements\n\n### Scenes\nTransition Framework can also be used to animate element changes within current activity layout. \n\nTransitions happen between scenes. A scene is just a regular layout which **defines a static state of our UI**. You can transition from one scene to another and Transition Framework will animate views in between.\n\n```java\nscene1 = Scene.getSceneForLayout(sceneRoot, R.layout.activity_animations_scene1, this);\nscene2 = Scene.getSceneForLayout(sceneRoot, R.layout.activity_animations_scene2, this);\nscene3 = Scene.getSceneForLayout(sceneRoot, R.layout.activity_animations_scene3, this);\nscene4 = Scene.getSceneForLayout(sceneRoot, R.layout.activity_animations_scene4, this);\n\n(...)\n\n@Override\npublic void onClick(View v) {\n    switch (v.getId()) {\n        case R.id.button1:\n            TransitionManager.go(scene1, new ChangeBounds());\n            break;\n        case R.id.button2:\n            TransitionManager.go(scene2, TransitionInflater.from(this).inflateTransition(R.transition.slide_and_changebounds));\n            break;\n        case R.id.button3:\n            TransitionManager.go(scene3, TransitionInflater.from(this).inflateTransition(R.transition.slide_and_changebounds_sequential));\n            break;\n        case R.id.button4:\n            TransitionManager.go(scene4, TransitionInflater.from(this).inflateTransition(R.transition.slide_and_changebounds_sequential_with_interpolators));\n            break;  \n    }\n}\n```\n\nThat code would produce transition between four scenes in the same activity. Each transition has a different animation defined. \n\nTransition Framework will take all visible views in current scene and calculate whatever necessary animations are needed to arrange those views according to next scene.\n\n![scenes_anim]\n\n\n### Layout changes\n\nTransition Framework can also be used to animate layout property changes in a view. You just need to make whatever changes you want and it will perform necessary animations for you\n\n#### a) Begin Delayed Transition\n\nWith just this line of code we are telling the framework we are going to perform some UI changes that it will need to animate.\n\n```java\nTransitionManager.beginDelayedTransition(sceneRoot);\n```\n#### b) Change view layout properties\n\n\n```java\nViewGroup.LayoutParams params = greenIconView.getLayoutParams();\nparams.width = 200;\ngreenIconView.setLayoutParams(params);\n\n```\n\nChanging view width attribute to make it smaller will trigger a `layoutMeasure`. At that point the Transition framework will record start and ending values and will create an animation to transition from one to another.\n\n    \n![view layout animation][view_layout_anim]\n\n\n## 4. (Bonus) Shared elements + Circular Reveal\nCircular Reveal is just an animation to show or hide a group of UI elements. It is available since API 21 in `ViewAnimationUtils` class. \n\n\nCircular Reveal animation can be used in combination of Shared Element Transition to create meaningful animations that smoothly teach the user what is happening in the app.\n\n![reveal_shared_anim]\n\nWhat is happening in this example step by step is:\n\n* Orange circle is a shared element transitioning from `MainActivity` to `RevealActivity`.\n* On `RevealActivity` there is a listener to listen for shared element transition end. When that happens it does two things:\n  * Execute a Circular Reveal animation for the Toolbar\n  * Execute a scale up animation on `RevealActivity` views using plain old `ViewPropertyAnimator`\n\n\n> Listen to shared element enter transition end\n\n```java\nTransition transition = TransitionInflater.from(this).inflateTransition(R.transition.changebounds_with_arcmotion);\ngetWindow().setSharedElementEnterTransition(transition);\ntransition.addListener(new Transition.TransitionListener() {\n    @Override\n    public void onTransitionEnd(Transition transition) {\n        animateRevealShow(toolbar);\n        animateButtonsIn();\n    }\n    \n    (...)\n\n});\n        \n```\n\n> Reveal Toolbar\n\n```java\nprivate void animateRevealShow(View viewRoot) {\n    int cx = (viewRoot.getLeft() + viewRoot.getRight()) / 2;\n    int cy = (viewRoot.getTop() + viewRoot.getBottom()) / 2;\n    int finalRadius = Math.max(viewRoot.getWidth(), viewRoot.getHeight());\n\n    Animator anim = ViewAnimationUtils.createCircularReveal(viewRoot, cx, cy, 0, finalRadius);\n    viewRoot.setVisibility(View.VISIBLE);\n    anim.setDuration(1000);\n    anim.setInterpolator(new AccelerateInterpolator());\n    anim.start();\n}\n```  \n\n> Scale up activity layout views\n\n```java\nprivate void animateButtonsIn() {\n    for (int i = 0; i < bgViewGroup.getChildCount(); i++) {\n        View child = bgViewGroup.getChildAt(i);\n        child.animate()\n                .setStartDelay(100 + i * DELAY)\n                .setInterpolator(interpolator)\n                .alpha(1)\n                .scaleX(1)\n                .scaleY(1);\n    }\n}\n```\n\n### More circular reveal animations\n\nThere are many different ways you can create a reveal animation. The important thing is to use the animation to help the user understand what is happening in the app.\n\n#### Circular Reveal from the middle of target view\n\n![reveal_green]\n\n```java\nint cx = (viewRoot.getLeft() + viewRoot.getRight()) / 2;\nint cy = viewRoot.getTop();\nint finalRadius = Math.max(viewRoot.getWidth(), viewRoot.getHeight());\n\nAnimator anim = ViewAnimationUtils.createCircularReveal(viewRoot, cx, cy, 0, finalRadius);\nviewRoot.setBackgroundColor(color);\nanim.start();\n```        \n\n#### Circular Reveal from top of target view + animations\n\n![reveal_blue]\n\n```java\nint cx = (viewRoot.getLeft() + viewRoot.getRight()) / 2;\nint cy = (viewRoot.getTop() + viewRoot.getBottom()) / 2;\nint finalRadius = Math.max(viewRoot.getWidth(), viewRoot.getHeight());\n\nAnimator anim = ViewAnimationUtils.createCircularReveal(viewRoot, cx, cy, 0, finalRadius);\nviewRoot.setBackgroundColor(color);\nanim.addListener(new AnimatorListenerAdapter() {\n    @Override\n    public void onAnimationEnd(Animator animation) {\n        animateButtonsIn();\n    }\n});\nanim.start();\n``` \n\n\n#### Circular Reveal from touch point\n\n![reveal_yellow]\n\n```java\n@Override\npublic boolean onTouch(View view, MotionEvent motionEvent) {\n    if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {\n        if (view.getId() == R.id.square_yellow) {\n            revealFromCoordinates(motionEvent.getRawX(), motionEvent.getRawY());\n        }\n    }\n    return false;\n}\n```\n\n```java \nprivate Animator animateRevealColorFromCoordinates(int x, int y) {\n    float finalRadius = (float) Math.hypot(viewRoot.getWidth(), viewRoot.getHeight());\n\n    Animator anim = ViewAnimationUtils.createCircularReveal(viewRoot, x, y, 0, finalRadius);\n    viewRoot.setBackgroundColor(color);\n    anim.start();\n}\n```       \n\n#### Animate and Reveal\n\n![reveal_red]\n\n```java\nTransition transition = TransitionInflater.from(this).inflateTransition(R.transition.changebounds_with_arcmotion);\ntransition.addListener(new Transition.TransitionListener() {\n    @Override\n    public void onTransitionEnd(Transition transition) {\n        animateRevealColor(bgViewGroup, R.color.red);\n    }\n    (...)\n   \n});\nTransitionManager.beginDelayedTransition(bgViewGroup, transition);\nRelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\nlayoutParams.addRule(RelativeLayout.CENTER_IN_PARENT);\nbtnRed.setLayoutParams(layoutParams);\n```         \n  \n\n# Sample source code\n\n**[https://github.com/lgvalle/Material-Animations](https://github.com/lgvalle/Material-Animations/)**\n\n\n# More information\n\n  * Alex Lockwood posts about Transition Framework. A great in deep into this topic: [http://www.androiddesignpatterns.com/2014/12/activity-fragment-transitions-in-android-lollipop-part1.html](http://www.androiddesignpatterns.com/2014/12/activity-fragment-transitions-in-android-lollipop-part1.html)\n  * Amazing repository with lot of Material Design samples by Saul Molinero: [https://github.com/saulmm/Android-Material-Examples](https://github.com/saulmm/Android-Material-Examples)\n  * Chet Hasse video explaining Transition framework: [https://www.youtube.com/watch?v=S3H7nJ4QaD8](https://www.youtube.com/watch?v=S3H7nJ4QaD8)\n\n\n\n[transition-framework]: https://developer.android.com/training/transitions/overview.html\n\n[explode_link]: https://developer.android.com/reference/android/transition/Explode.html\n[fade_link]: https://developer.android.com/reference/android/transition/Fade.html\n[slide_link]: https://developer.android.com/reference/android/transition/Slide.html\n\n[transition_explode]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/transition_explode.gif\n[transition_slide]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/transition_slide.gif\n[transition_fade]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/transition_fade.gif\n[transition_fade2]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/transition_fade2.gif\n[transition_a_to_b]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/transition_A_to_B.png\n[transition_b_to_a]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/transition_B_to_A.png\n\n[shared_element]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/shared_element.png\n[shared_element_anim]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/shared_element_anim.gif\n[shared_element_no_overlap]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/shared_element_no_overlap.gif\n[shared_element_overlap]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/shared_element_overlap.gif\n\n[scenes_anim]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/scenes_anim.gif\n[view_layout_anim]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/view_layout_anim.gif\n\n[reveal_blue]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/reveal_blue.gif\n[reveal_red]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/reveal_red.gif\n[reveal_green]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/reveal_green.gif\n[reveal_yellow]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/reveal_yellow.gif\n[reveal_shared_anim]: https://raw.githubusercontent.com/lgvalle/Material-Animations/master/screenshots/shared_reveal_anim.gif\n"
  },
  {
    "path": "app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\nandroid {\n    compileSdkVersion 23\n    buildToolsVersion \"23.0.2\"\n\n    defaultConfig {\n        applicationId \"com.lgvalle.material_animations\"\n        minSdkVersion 21\n        targetSdkVersion 23\n        versionCode 1\n        versionName \"1.0\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'\n        }\n    }\n    dataBinding {\n        enabled = true\n    }\n}\n\ndependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    compile 'com.android.support:appcompat-v7:23.1.1'\n    compile 'com.android.support:recyclerview-v7:23.1.1'\n}\n"
  },
  {
    "path": "app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /Users/lgvalle/Developer/android-sdk/tools/proguard/proguard-android.txt\n# You can edit the include path and order by changing the proguardFiles\n# directive in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# Add any project specific keep options here:\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n"
  },
  {
    "path": "app/src/androidTest/java/com/lgvalle/material_animations/ApplicationTest.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http://d.android.com/tools/testing/testing_android.html\">Testing Fundamentals</a>\n */\npublic class ApplicationTest extends ApplicationTestCase<Application> {\n    public ApplicationTest() {\n        super(Application.class);\n    }\n}"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.lgvalle.material_animations\">\n\n    <application\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:theme=\"@style/MaterialAnimations\">\n        <activity\n            android:name=\".MainActivity\"\n            android:label=\"@string/app_name\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n        <activity\n            android:name=\".TransitionActivity1\"\n            android:theme=\"@style/MaterialAnimations.Red\" />\n        <activity\n            android:name=\".TransitionActivity2\"\n            android:theme=\"@style/MaterialAnimations.Red\" />\n        <activity\n            android:name=\".TransitionActivity3\"\n            android:theme=\"@style/MaterialAnimations.Red\" />\n        <activity\n            android:name=\".SharedElementActivity\"\n            android:theme=\"@style/MaterialAnimations.Blue\" />\n\n        <activity\n            android:name=\".AnimationsActivity1\"\n            android:theme=\"@style/MaterialAnimations.Green\" />\n\n        <activity\n            android:name=\".AnimationsActivity2\"\n            android:theme=\"@style/MaterialAnimations.Green\" />\n\n        <activity\n            android:name=\".RevealActivity\"\n            android:theme=\"@style/MaterialAnimations.Yellow\" />\n    </application>\n\n</manifest>\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/AnimationsActivity1.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.content.Intent;\nimport android.databinding.DataBindingUtil;\nimport android.os.Bundle;\nimport android.transition.Fade;\nimport android.transition.TransitionManager;\nimport android.view.Gravity;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\nimport android.widget.LinearLayout;\n\nimport com.lgvalle.material_animations.databinding.ActivityAnimations1Binding;\n\npublic class AnimationsActivity1 extends BaseDetailActivity {\n    private ImageView square;\n    private ViewGroup viewRoot;\n    private boolean sizeChanged;\n    private int savedWidth;\n    private boolean positionChanged;\n    private Sample sample;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        bindData();\n        setupWindowAnimations();\n        setupLayout();\n        setupToolbar();\n    }\n\n    private void setupWindowAnimations() {\n        getWindow().setReenterTransition(new Fade());\n    }\n\n    private void bindData() {\n        ActivityAnimations1Binding binding = DataBindingUtil.setContentView(this, R.layout.activity_animations1);\n        sample = (Sample) getIntent().getExtras().getSerializable(EXTRA_SAMPLE);\n        binding.setAnimationsSample(sample);\n    }\n\n    private void setupLayout() {\n        square = (ImageView) findViewById(R.id.square_green);\n        viewRoot = (ViewGroup) findViewById(R.id.sample3_root);\n        findViewById(R.id.sample3_button1).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                changeLayout();\n            }\n        });\n        findViewById(R.id.sample3_button2).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                changePosition();\n            }\n        });\n\n        findViewById(R.id.sample3_button3).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Intent i = new Intent(AnimationsActivity1.this, AnimationsActivity2.class);\n                i.putExtra(EXTRA_SAMPLE, sample);\n                transitionTo(i);\n            }\n        });\n    }\n\n    private void changeLayout() {\n        TransitionManager.beginDelayedTransition(viewRoot);\n\n        ViewGroup.LayoutParams params = square.getLayoutParams();\n        if (sizeChanged) {\n            params.width = savedWidth;\n        } else {\n            savedWidth = params.width;\n            params.width = 200;\n        }\n        sizeChanged = !sizeChanged;\n        square.setLayoutParams(params);\n    }\n\n    private void changePosition() {\n        TransitionManager.beginDelayedTransition(viewRoot);\n\n        LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) square.getLayoutParams();\n        if (positionChanged) {\n            lp.gravity = Gravity.CENTER;\n        } else {\n            lp.gravity = Gravity.LEFT;\n        }\n        positionChanged = !positionChanged;\n        square.setLayoutParams(lp);\n    }\n\n\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/AnimationsActivity2.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.databinding.DataBindingUtil;\nimport android.os.Bundle;\nimport android.transition.ChangeBounds;\nimport android.transition.Scene;\nimport android.transition.Transition;\nimport android.transition.TransitionInflater;\nimport android.transition.TransitionManager;\nimport android.view.View;\nimport android.view.ViewGroup;\n\nimport com.lgvalle.material_animations.databinding.ActivityAnimations2Binding;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class AnimationsActivity2 extends BaseDetailActivity {\n\n    private static final int DELAY = 100;\n    private Scene scene0;\n    private Scene scene1;\n    private Scene scene2;\n    private Scene scene3;\n    private Scene scene4;\n    private final List<View> viewsToAnimate = new ArrayList<>();\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        bindData();\n        setupLayout();\n        setupToolbar();\n        setupWindowAnimations();\n    }\n\n    private void bindData() {\n        ActivityAnimations2Binding binding = DataBindingUtil.setContentView(\n                this, R.layout.activity_animations2);\n        Sample sample = (Sample) getIntent().getExtras().getSerializable(EXTRA_SAMPLE);\n        binding.setAnimationsSample(sample);\n    }\n\n    private void setupWindowAnimations() {\n        getWindow().setEnterTransition(TransitionInflater.from(this).inflateTransition(\n                R.transition.slide_from_bottom));\n        getWindow().getEnterTransition().addListener(new Transition.TransitionListener() {\n            @Override\n            public void onTransitionStart(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionCancel(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionPause(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionResume(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionEnd(Transition transition) {\n                getWindow().getEnterTransition().removeListener(this);\n                TransitionManager.go(scene0);\n            }\n        });\n    }\n\n    private void setupLayout() {\n        final ViewGroup activityRoot = (ViewGroup) findViewById(R.id.buttons_group);\n        ViewGroup sceneRoot = (ViewGroup) findViewById(R.id.scene_root);\n\n        scene0 = Scene.getSceneForLayout(sceneRoot, R.layout.activity_animations_scene0, this);\n        scene0.setEnterAction(new Runnable() {\n            @Override\n            public void run() {\n                for (int i = 0; i < viewsToAnimate.size(); i++) {\n                    View child = viewsToAnimate.get(i);\n                    child.animate()\n                            .setStartDelay(i * DELAY)\n                            .scaleX(1)\n                            .scaleY(1);\n\n                }\n            }\n        });\n        scene0.setExitAction(new Runnable() {\n            @Override\n            public void run() {\n                TransitionManager.beginDelayedTransition(activityRoot);\n                View title = scene0.getSceneRoot().findViewById(R.id.scene0_title);\n                title.setScaleX(0);\n                title.setScaleY(0);\n            }\n        });\n\n\n        scene1 = Scene.getSceneForLayout(sceneRoot, R.layout.activity_animations_scene1, this);\n        scene2 = Scene.getSceneForLayout(sceneRoot, R.layout.activity_animations_scene2, this);\n        scene3 = Scene.getSceneForLayout(sceneRoot, R.layout.activity_animations_scene3, this);\n        scene4 = Scene.getSceneForLayout(sceneRoot, R.layout.activity_animations_scene4, this);\n\n        View button1 = findViewById(R.id.sample3_button1);\n        button1.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                TransitionManager.go(scene1, new ChangeBounds());\n            }\n        });\n        View button2 = findViewById(R.id.sample3_button2);\n        button2.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                TransitionManager.go(scene2, TransitionInflater.from(AnimationsActivity2.this).\n                        inflateTransition(R.transition.slide_and_changebounds));\n            }\n        });\n\n        View button3 = findViewById(R.id.sample3_button3);\n        button3.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                TransitionManager.go(scene3, TransitionInflater.from(AnimationsActivity2.this).\n                        inflateTransition(R.transition.slide_and_changebounds_sequential));\n            }\n        });\n\n        View button4 = findViewById(R.id.sample3_button4);\n        button4.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                TransitionManager.go(scene4, TransitionInflater.from(AnimationsActivity2.this).\n                        inflateTransition(R.transition.slide_and_changebounds_sequential_with_interpolators));\n            }\n        });\n\n        viewsToAnimate.add(button1);\n        viewsToAnimate.add(button2);\n        viewsToAnimate.add(button3);\n        viewsToAnimate.add(button4);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/BaseDetailActivity.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.content.Intent;\nimport android.support.v4.app.ActivityOptionsCompat;\nimport android.support.v4.util.Pair;\nimport android.support.v7.app.AppCompatActivity;\nimport android.support.v7.widget.Toolbar;\nimport android.view.View;\n\n/**\n * Created by lgvalle on 12/09/15.\n */\npublic class BaseDetailActivity extends AppCompatActivity {\n    static final String EXTRA_SAMPLE = \"sample\";\n    static final String EXTRA_TYPE = \"type\";\n    static final int TYPE_PROGRAMMATICALLY = 0;\n    static final int TYPE_XML = 1;\n\n    void setupToolbar() {\n        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n        setSupportActionBar(toolbar);\n        getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n        getSupportActionBar().setDisplayShowTitleEnabled(false);\n    }\n\n    @Override\n    public boolean onSupportNavigateUp() {\n        onBackPressed();\n        return true;\n    }\n\n    @SuppressWarnings(\"unchecked\") void transitionTo(Intent i) {\n        final Pair<View, String>[] pairs = TransitionHelper.createSafeTransitionParticipants(this, true);\n        ActivityOptionsCompat transitionActivityOptions = ActivityOptionsCompat.makeSceneTransitionAnimation(this, pairs);\n        startActivity(i, transitionActivityOptions.toBundle());\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/MainActivity.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.os.Bundle;\nimport android.support.v4.content.ContextCompat;\nimport android.support.v7.app.AppCompatActivity;\nimport android.support.v7.widget.LinearLayoutManager;\nimport android.support.v7.widget.RecyclerView;\nimport android.support.v7.widget.Toolbar;\nimport android.transition.Slide;\nimport android.view.Gravity;\n\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class MainActivity extends AppCompatActivity {\n    private List<Sample> samples;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        setupWindowAnimations();\n        setupSamples();\n        setupToolbar();\n        setupLayout();\n    }\n\n    private void setupWindowAnimations() {\n        // Re-enter transition is executed when returning to this activity\n        Slide slideTransition = new Slide();\n        slideTransition.setSlideEdge(Gravity.LEFT);\n        slideTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));\n        getWindow().setReenterTransition(slideTransition);\n        getWindow().setExitTransition(slideTransition);\n    }\n\n    private void setupSamples() {\n        samples = Arrays.asList(\n                new Sample(ContextCompat.getColor(this, R.color.sample_red), \"Transitions\"),\n                new Sample(ContextCompat.getColor(this, R.color.sample_blue), \"Shared Elements\"),\n                new Sample(ContextCompat.getColor(this, R.color.sample_green), \"View animations\"),\n                new Sample(ContextCompat.getColor(this, R.color.sample_yellow), \"Circular Reveal Animation\")\n        );\n    }\n\n    private void setupToolbar() {\n        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n        setSupportActionBar(toolbar);\n        getSupportActionBar().setDisplayShowTitleEnabled(false);\n    }\n\n    private void setupLayout() {\n        RecyclerView recyclerView = (RecyclerView) findViewById(R.id.sample_list);\n        recyclerView.setHasFixedSize(true);\n        recyclerView.setLayoutManager(new LinearLayoutManager(this));\n        SamplesRecyclerAdapter samplesRecyclerAdapter = new SamplesRecyclerAdapter(this, samples);\n        recyclerView.setAdapter(samplesRecyclerAdapter);\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/RevealActivity.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.animation.Animator;\nimport android.animation.AnimatorListenerAdapter;\nimport android.databinding.DataBindingUtil;\nimport android.os.Bundle;\nimport android.support.annotation.ColorRes;\nimport android.support.v4.content.ContextCompat;\nimport android.support.v7.widget.Toolbar;\nimport android.transition.Fade;\nimport android.transition.Transition;\nimport android.transition.TransitionInflater;\nimport android.transition.TransitionManager;\nimport android.view.MotionEvent;\nimport android.view.View;\nimport android.view.ViewAnimationUtils;\nimport android.view.ViewGroup;\nimport android.view.animation.AccelerateDecelerateInterpolator;\nimport android.view.animation.AccelerateInterpolator;\nimport android.view.animation.AnimationUtils;\nimport android.view.animation.Interpolator;\nimport android.widget.RelativeLayout;\nimport android.widget.TextView;\n\nimport com.lgvalle.material_animations.databinding.ActivityRevealBinding;\n\n\npublic class RevealActivity extends BaseDetailActivity implements View.OnTouchListener {\n    private static final int DELAY = 100;\n    private RelativeLayout bgViewGroup;\n    private Toolbar toolbar;\n    private Interpolator interpolator;\n    private TextView body;\n    private View btnRed;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        bindData();\n        setupWindowAnimations();\n        setupLayout();\n        setupToolbar();\n    }\n\n    private void bindData() {\n        ActivityRevealBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_reveal);\n        Sample sample = (Sample) getIntent().getExtras().getSerializable(EXTRA_SAMPLE);\n        binding.setReveal1Sample(sample);\n    }\n\n    private void setupWindowAnimations() {\n        interpolator = AnimationUtils.loadInterpolator(this, android.R.interpolator.linear_out_slow_in);\n        setupEnterAnimations();\n        setupExitAnimations();\n    }\n\n    private void setupEnterAnimations() {\n        Transition transition = TransitionInflater.from(this).inflateTransition(R.transition.changebounds_with_arcmotion);\n        getWindow().setSharedElementEnterTransition(transition);\n        transition.addListener(new Transition.TransitionListener() {\n            @Override\n            public void onTransitionStart(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionEnd(Transition transition) {\n                // Removing listener here is very important because shared element transition is executed again backwards on exit. If we don't remove the listener this code will be triggered again.\n                transition.removeListener(this);\n                hideTarget();\n                animateRevealShow(toolbar);\n                animateButtonsIn();\n            }\n\n            @Override\n            public void onTransitionCancel(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionPause(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionResume(Transition transition) {\n            }\n        });\n    }\n\n    private void setupExitAnimations() {\n        Fade returnTransition = new Fade();\n        getWindow().setReturnTransition(returnTransition);\n        returnTransition.setDuration(getResources().getInteger(R.integer.anim_duration_medium));\n        returnTransition.setStartDelay(getResources().getInteger(R.integer.anim_duration_medium));\n        returnTransition.addListener(new Transition.TransitionListener() {\n            @Override\n            public void onTransitionStart(Transition transition) {\n                transition.removeListener(this);\n                animateButtonsOut();\n                animateRevealHide(bgViewGroup);\n            }\n\n            @Override\n            public void onTransitionEnd(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionCancel(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionPause(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionResume(Transition transition) {\n            }\n        });\n    }\n\n    private void setupLayout() {\n        bgViewGroup = (RelativeLayout) findViewById(R.id.reveal_root);\n        toolbar = (Toolbar) findViewById(R.id.toolbar);\n        body = ((TextView) findViewById(R.id.sample_body));\n        View btnGreen = findViewById(R.id.square_green);\n        btnGreen.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                revealGreen();\n            }\n        });\n        btnRed = findViewById(R.id.square_red);\n        btnRed.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                revealRed();\n            }\n        });\n        View btnBlue = findViewById(R.id.square_blue);\n        btnBlue.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                revealBlue();\n            }\n        });\n        findViewById(R.id.square_yellow).setOnTouchListener(this);\n    }\n\n    private void revealBlue() {\n        animateButtonsOut();\n        Animator anim = animateRevealColorFromCoordinates(bgViewGroup, R.color.sample_blue, bgViewGroup.getWidth() / 2, 0);\n        anim.addListener(new AnimatorListenerAdapter() {\n            @Override\n            public void onAnimationEnd(Animator animation) {\n                animateButtonsIn();\n            }\n        });\n        body.setText(R.string.reveal_body4);\n        body.setTextColor(ContextCompat.getColor(this, R.color.theme_blue_background));\n    }\n\n    private void revealRed() {\n        final ViewGroup.LayoutParams originalParams = btnRed.getLayoutParams();\n        Transition transition = TransitionInflater.from(this).inflateTransition(R.transition.changebounds_with_arcmotion);\n        transition.addListener(new Transition.TransitionListener() {\n            @Override\n            public void onTransitionStart(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionEnd(Transition transition) {\n                animateRevealColor(bgViewGroup, R.color.sample_red);\n                body.setText(R.string.reveal_body3);\n                body.setTextColor(ContextCompat.getColor(RevealActivity.this, R.color.theme_red_background));\n                btnRed.setLayoutParams(originalParams);\n            }\n\n            @Override\n            public void onTransitionCancel(Transition transition) {\n            }\n\n            @Override\n            public void onTransitionPause(Transition transition) {\n\n            }\n\n            @Override\n            public void onTransitionResume(Transition transition) {\n\n            }\n        });\n        TransitionManager.beginDelayedTransition(bgViewGroup, transition);\n        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n        layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT);\n        btnRed.setLayoutParams(layoutParams);\n    }\n\n    private void revealYellow(float x, float y) {\n        animateRevealColorFromCoordinates(bgViewGroup, R.color.sample_yellow, (int) x, (int) y);\n        body.setText(R.string.reveal_body1);\n        body.setTextColor(ContextCompat.getColor(this, R.color.theme_yellow_background));\n    }\n\n    private void revealGreen() {\n        animateRevealColor(bgViewGroup, R.color.sample_green);\n        body.setText(R.string.reveal_body2);\n        body.setTextColor(ContextCompat.getColor(this, R.color.theme_green_background));\n    }\n\n    private void hideTarget() {\n        findViewById(R.id.shared_target).setVisibility(View.GONE);\n    }\n\n    private void animateButtonsIn() {\n        for (int i = 0; i < bgViewGroup.getChildCount(); i++) {\n            View child = bgViewGroup.getChildAt(i);\n            child.animate()\n                    .setStartDelay(100 + i * DELAY)\n                    .setInterpolator(interpolator)\n                    .alpha(1)\n                    .scaleX(1)\n                    .scaleY(1);\n        }\n    }\n\n    private void animateButtonsOut() {\n        for (int i = 0; i < bgViewGroup.getChildCount(); i++) {\n            View child = bgViewGroup.getChildAt(i);\n            child.animate()\n                    .setStartDelay(i)\n                    .setInterpolator(interpolator)\n                    .alpha(0)\n                    .scaleX(0f)\n                    .scaleY(0f);\n        }\n    }\n\n    @Override\n    public boolean onTouch(View view, MotionEvent motionEvent) {\n        if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {\n            if (view.getId() == R.id.square_yellow) {\n                revealYellow(motionEvent.getRawX(), motionEvent.getRawY());\n            }\n        }\n        return false;\n    }\n\n    private void animateRevealShow(View viewRoot) {\n        int cx = (viewRoot.getLeft() + viewRoot.getRight()) / 2;\n        int cy = (viewRoot.getTop() + viewRoot.getBottom()) / 2;\n        int finalRadius = Math.max(viewRoot.getWidth(), viewRoot.getHeight());\n\n        Animator anim = ViewAnimationUtils.createCircularReveal(viewRoot, cx, cy, 0, finalRadius);\n        viewRoot.setVisibility(View.VISIBLE);\n        anim.setDuration(getResources().getInteger(R.integer.anim_duration_long));\n        anim.setInterpolator(new AccelerateInterpolator());\n        anim.start();\n    }\n\n    private void animateRevealColor(ViewGroup viewRoot, @ColorRes int color) {\n        int cx = (viewRoot.getLeft() + viewRoot.getRight()) / 2;\n        int cy = (viewRoot.getTop() + viewRoot.getBottom()) / 2;\n        animateRevealColorFromCoordinates(viewRoot, color, cx, cy);\n    }\n\n    private Animator animateRevealColorFromCoordinates(ViewGroup viewRoot, @ColorRes int color, int x, int y) {\n        float finalRadius = (float) Math.hypot(viewRoot.getWidth(), viewRoot.getHeight());\n\n        Animator anim = ViewAnimationUtils.createCircularReveal(viewRoot, x, y, 0, finalRadius);\n        viewRoot.setBackgroundColor(ContextCompat.getColor(this, color));\n        anim.setDuration(getResources().getInteger(R.integer.anim_duration_long));\n        anim.setInterpolator(new AccelerateDecelerateInterpolator());\n        anim.start();\n        return anim;\n    }\n\n    private void animateRevealHide(final View viewRoot) {\n        int cx = (viewRoot.getLeft() + viewRoot.getRight()) / 2;\n        int cy = (viewRoot.getTop() + viewRoot.getBottom()) / 2;\n        int initialRadius = viewRoot.getWidth();\n\n        Animator anim = ViewAnimationUtils.createCircularReveal(viewRoot, cx, cy, initialRadius, 0);\n        anim.addListener(new AnimatorListenerAdapter() {\n            @Override\n            public void onAnimationEnd(Animator animation) {\n                super.onAnimationEnd(animation);\n                viewRoot.setVisibility(View.INVISIBLE);\n            }\n        });\n        anim.setDuration(getResources().getInteger(R.integer.anim_duration_medium));\n        anim.start();\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/Sample.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.databinding.BindingAdapter;\nimport android.support.annotation.ColorRes;\nimport android.support.v4.graphics.drawable.DrawableCompat;\nimport android.widget.ImageView;\n\nimport java.io.Serializable;\n\n/**\n * Created by lgvalle on 04/09/15.\n */\npublic class Sample implements Serializable {\n\n    final int color;\n    private final String name;\n\n    public Sample(@ColorRes int color, String name) {\n        this.color = color;\n        this.name = name;\n    }\n\n    @BindingAdapter(\"bind:colorTint\")\n    public static void setColorTint(ImageView view, @ColorRes int color) {\n        DrawableCompat.setTint(view.getDrawable(), color);\n        //view.setColorFilter(color, PorterDuff.Mode.SRC_IN);\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public int getColor() {\n        return color;\n    }\n\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/SamplesRecyclerAdapter.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.databinding.DataBindingUtil;\nimport android.support.v4.app.ActivityOptionsCompat;\nimport android.support.v4.util.Pair;\nimport android.support.v7.widget.RecyclerView;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\n\nimport com.lgvalle.material_animations.databinding.RowSampleBinding;\n\nimport java.util.List;\n\npublic class SamplesRecyclerAdapter extends RecyclerView.Adapter<SamplesRecyclerAdapter.SamplesViewHolder> {\n    private final Activity activity;\n    private final List<Sample> samples;\n\n    public SamplesRecyclerAdapter(Activity activity, List<Sample> samples) {\n        this.activity = activity;\n        this.samples = samples;\n    }\n\n    @Override\n    public SamplesViewHolder onCreateViewHolder(ViewGroup parent, int position) {\n        RowSampleBinding binding = RowSampleBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);\n        return new SamplesViewHolder(binding.getRoot());\n    }\n\n    @Override\n    public void onBindViewHolder(final SamplesViewHolder viewHolder, final int position) {\n        final Sample sample = samples.get(viewHolder.getAdapterPosition());\n        viewHolder.binding.setSample(sample);\n        viewHolder.binding.sampleLayout.setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                switch (viewHolder.getAdapterPosition()) {\n                    case 0:\n                        transitionToActivity(TransitionActivity1.class, sample);\n                        break;\n                    case 1:\n                        transitionToActivity(SharedElementActivity.class, viewHolder, sample);\n                        break;\n                    case 2:\n                        transitionToActivity(AnimationsActivity1.class, sample);\n                        break;\n                    case 3:\n                        transitionToActivity(RevealActivity.class, viewHolder, sample, R.string.transition_reveal1);\n                        break;\n                }\n            }\n        });\n    }\n\n    private void transitionToActivity(Class target, Sample sample) {\n        final Pair<View, String>[] pairs = TransitionHelper.createSafeTransitionParticipants(activity, true);\n        startActivity(target, pairs, sample);\n    }\n\n\n    private void transitionToActivity(Class target, SamplesViewHolder viewHolder, Sample sample, int transitionName) {\n        final Pair<View, String>[] pairs = TransitionHelper.createSafeTransitionParticipants(activity, false,\n                new Pair<>(viewHolder.binding.sampleIcon, activity.getString(transitionName)));\n        startActivity(target, pairs, sample);\n    }\n\n    private void transitionToActivity(Class target, SamplesViewHolder viewHolder, Sample sample) {\n        final Pair<View, String>[] pairs = TransitionHelper.createSafeTransitionParticipants(activity, false,\n                new Pair<>(viewHolder.binding.sampleIcon, activity.getString(R.string.square_blue_name)),\n                new Pair<>(viewHolder.binding.sampleName, activity.getString(R.string.sample_blue_title)));\n        startActivity(target, pairs, sample);\n    }\n\n    private void startActivity(Class target, Pair<View, String>[] pairs, Sample sample) {\n        Intent i = new Intent(activity, target);\n        ActivityOptionsCompat transitionActivityOptions = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, pairs);\n        i.putExtra(\"sample\", sample);\n        activity.startActivity(i, transitionActivityOptions.toBundle());\n    }\n\n    @Override\n    public int getItemCount() {\n        return samples.size();\n    }\n\n\n    public class SamplesViewHolder extends RecyclerView.ViewHolder {\n        final RowSampleBinding binding;\n\n        public SamplesViewHolder(View rootView) {\n            super(rootView);\n            binding = DataBindingUtil.bind(rootView);\n\n        }\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/SharedElementActivity.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.databinding.DataBindingUtil;\nimport android.os.Bundle;\nimport android.transition.ChangeBounds;\nimport android.transition.Slide;\nimport android.view.Gravity;\n\nimport com.lgvalle.material_animations.databinding.ActivitySharedelementBinding;\n\npublic class SharedElementActivity extends BaseDetailActivity {\n\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        Sample sample = (Sample) getIntent().getExtras().getSerializable(EXTRA_SAMPLE);\n        bindData(sample);\n        setupWindowAnimations();\n        setupLayout(sample);\n        setupToolbar();\n    }\n\n    private void bindData(Sample sample) {\n        ActivitySharedelementBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_sharedelement);\n        binding.setSharedSample(sample);\n    }\n\n    private void setupWindowAnimations() {\n        // We are not interested in defining a new Enter Transition. Instead we change default transition duration\n        getWindow().getEnterTransition().setDuration(getResources().getInteger(R.integer.anim_duration_long));\n    }\n\n    private void setupLayout(Sample sample) {\n        // Transition for fragment1\n        Slide slideTransition = new Slide(Gravity.LEFT);\n        slideTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));\n        // Create fragment and define some of it transitions\n        SharedElementFragment1 sharedElementFragment1 = SharedElementFragment1.newInstance(sample);\n        sharedElementFragment1.setReenterTransition(slideTransition);\n        sharedElementFragment1.setExitTransition(slideTransition);\n        sharedElementFragment1.setSharedElementEnterTransition(new ChangeBounds());\n\n        getSupportFragmentManager().beginTransaction()\n                .replace(R.id.sample2_content, sharedElementFragment1)\n                .commit();\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/SharedElementFragment1.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.graphics.drawable.DrawableCompat;\nimport android.transition.ChangeBounds;\nimport android.transition.Slide;\nimport android.view.Gravity;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\n\n/**\n * Created by lgvalle on 05/09/15.\n */\npublic class SharedElementFragment1 extends Fragment {\n\n    private static final String EXTRA_SAMPLE = \"sample\";\n\n    public static SharedElementFragment1 newInstance(Sample sample) {\n\n        Bundle args = new Bundle();\n\n        args.putSerializable(EXTRA_SAMPLE, sample);\n        SharedElementFragment1 fragment = new SharedElementFragment1();\n        fragment.setArguments(args);\n        return fragment;\n    }\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        View view = inflater.inflate(R.layout.activity_sharedelement_fragment1, container, false);\n        final Sample sample = (Sample) getArguments().getSerializable(EXTRA_SAMPLE);\n\n        final ImageView squareBlue = (ImageView) view.findViewById(R.id.square_blue);\n        DrawableCompat.setTint(squareBlue.getDrawable(), sample.color);\n\n        view.findViewById(R.id.sample2_button1).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                addNextFragment(sample, squareBlue, false);\n            }\n        });\n\n        view.findViewById(R.id.sample2_button2).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                addNextFragment(sample, squareBlue, true);\n            }\n        });\n\n        return view;\n    }\n\n    private void addNextFragment(Sample sample, ImageView squareBlue, boolean overlap) {\n        SharedElementFragment2 sharedElementFragment2 = SharedElementFragment2.newInstance(sample);\n\n        Slide slideTransition = new Slide(Gravity.RIGHT);\n        slideTransition.setDuration(getResources().getInteger(R.integer.anim_duration_medium));\n\n        ChangeBounds changeBoundsTransition = new ChangeBounds();\n        changeBoundsTransition.setDuration(getResources().getInteger(R.integer.anim_duration_medium));\n\n        sharedElementFragment2.setEnterTransition(slideTransition);\n        sharedElementFragment2.setAllowEnterTransitionOverlap(overlap);\n        sharedElementFragment2.setAllowReturnTransitionOverlap(overlap);\n        sharedElementFragment2.setSharedElementEnterTransition(changeBoundsTransition);\n\n        getFragmentManager().beginTransaction()\n                .replace(R.id.sample2_content, sharedElementFragment2)\n                .addToBackStack(null)\n                .addSharedElement(squareBlue, getString(R.string.square_blue_name))\n                .commit();\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/SharedElementFragment2.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.support.v4.graphics.drawable.DrawableCompat;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimport android.widget.ImageView;\n\npublic class SharedElementFragment2 extends Fragment {\n    private static final String EXTRA_SAMPLE = \"sample\";\n\n    public static SharedElementFragment2 newInstance(Sample sample) {\n        Bundle args = new Bundle();\n        args.putSerializable(EXTRA_SAMPLE, sample);\n        SharedElementFragment2 fragment = new SharedElementFragment2();\n        fragment.setArguments(args);\n        return fragment;\n    }\n\n    @Override\n    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n        View view = inflater.inflate(R.layout.activity_sharedelement_fragment2, container, false);\n        Sample sample = (Sample) getArguments().getSerializable(EXTRA_SAMPLE);\n\n        ImageView squareBlue = (ImageView) view.findViewById(R.id.square_blue);\n        DrawableCompat.setTint(squareBlue.getDrawable(), sample.color);\n\n        return view;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/TransitionActivity1.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.content.Intent;\nimport android.databinding.DataBindingUtil;\nimport android.os.Bundle;\nimport android.transition.Fade;\nimport android.transition.Slide;\nimport android.transition.Visibility;\nimport android.view.View;\n\nimport com.lgvalle.material_animations.databinding.ActivityTransition1Binding;\n\npublic class TransitionActivity1 extends BaseDetailActivity {\n    private Sample sample;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        bindData();\n        setupWindowAnimations();\n        setupLayout();\n        setupToolbar();\n    }\n\n    private void bindData() {\n        ActivityTransition1Binding binding = DataBindingUtil.setContentView(this, R.layout.activity_transition1);\n        sample = (Sample) getIntent().getExtras().getSerializable(EXTRA_SAMPLE);\n        binding.setTransition1Sample(sample);\n    }\n\n    private void setupWindowAnimations() {\n        Visibility enterTransition = buildEnterTransition();\n        getWindow().setEnterTransition(enterTransition);\n    }\n\n\n    private void setupLayout() {\n        findViewById(R.id.sample1_button1).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Intent i = new Intent(TransitionActivity1.this, TransitionActivity2.class);\n                i.putExtra(EXTRA_SAMPLE, sample);\n                i.putExtra(EXTRA_TYPE, TYPE_PROGRAMMATICALLY);\n                transitionTo(i);\n            }\n        });\n\n        findViewById(R.id.sample1_button2).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Intent i = new Intent(TransitionActivity1.this, TransitionActivity2.class);\n                i.putExtra(EXTRA_SAMPLE, sample);\n                i.putExtra(EXTRA_TYPE, TYPE_XML);\n                transitionTo(i);\n            }\n        });\n\n        findViewById(R.id.sample1_button3).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Intent i = new Intent(TransitionActivity1.this, TransitionActivity3.class);\n                i.putExtra(EXTRA_SAMPLE, sample);\n                i.putExtra(EXTRA_TYPE, TYPE_PROGRAMMATICALLY);\n                transitionTo(i);\n            }\n        });\n\n        findViewById(R.id.sample1_button4).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Intent i = new Intent(TransitionActivity1.this, TransitionActivity3.class);\n                i.putExtra(EXTRA_SAMPLE, sample);\n                i.putExtra(EXTRA_TYPE, TYPE_XML);\n                transitionTo(i);\n            }\n        });\n\n        findViewById(R.id.sample1_button5).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                Visibility returnTransition = buildReturnTransition();\n                getWindow().setReturnTransition(returnTransition);\n\n                finishAfterTransition();\n            }\n        });\n        findViewById(R.id.sample1_button6).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                /**\n                 * If no return transition is defined Android will use reversed enter transition\n                 * In this case, return transition will be a reversed Slide (defined in buildEnterTransition)\n                 */\n                finishAfterTransition();\n            }\n        });\n    }\n\n    private Visibility buildEnterTransition() {\n        Fade enterTransition = new Fade();\n        enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));\n        // This view will not be affected by enter transition animation\n        enterTransition.excludeTarget(R.id.square_red, true);\n        return enterTransition;\n    }\n\n    private Visibility buildReturnTransition() {\n        Visibility enterTransition = new Slide();\n        enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));\n        return enterTransition;\n    }\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/TransitionActivity2.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.databinding.DataBindingUtil;\nimport android.os.Bundle;\nimport android.transition.Explode;\nimport android.transition.Transition;\nimport android.transition.TransitionInflater;\nimport android.view.View;\n\nimport com.lgvalle.material_animations.databinding.ActivityTransition2Binding;\n\npublic class TransitionActivity2 extends BaseDetailActivity {\n\n    private int type;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        bindData();\n        setupWindowAnimations();\n        setupLayout();\n        setupToolbar();\n    }\n\n    private void bindData() {\n        ActivityTransition2Binding binding = DataBindingUtil.setContentView(this, R.layout.activity_transition2);\n        Sample sample = (Sample) getIntent().getExtras().getSerializable(EXTRA_SAMPLE);\n        type = getIntent().getExtras().getInt(EXTRA_TYPE);\n        binding.setTransition2Sample(sample);\n    }\n\n    private void setupWindowAnimations() {\n        Transition transition;\n\n        if (type == TYPE_PROGRAMMATICALLY) {\n            transition = buildEnterTransition();\n        }  else {\n            transition = TransitionInflater.from(this).inflateTransition(R.transition.explode);\n        }\n        getWindow().setEnterTransition(transition);\n    }\n\n    private void setupLayout() {\n        findViewById(R.id.exit_button).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                finishAfterTransition();\n            }\n        });\n    }\n\n    private Transition buildEnterTransition() {\n        Explode enterTransition = new Explode();\n        enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));\n        return enterTransition;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/TransitionActivity3.java",
    "content": "package com.lgvalle.material_animations;\n\nimport android.databinding.DataBindingUtil;\nimport android.os.Bundle;\nimport android.transition.Slide;\nimport android.transition.Transition;\nimport android.transition.TransitionInflater;\nimport android.transition.Visibility;\nimport android.view.Gravity;\nimport android.view.View;\n\nimport com.lgvalle.material_animations.databinding.ActivityTransition3Binding;\n\npublic class TransitionActivity3 extends BaseDetailActivity {\n\n    private int type;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        bindData();\n        setupWindowAnimations();\n        setupLayout();\n        setupToolbar();\n    }\n\n    private void bindData() {\n        ActivityTransition3Binding binding = DataBindingUtil.setContentView(this, R.layout.activity_transition3);\n        Sample sample = (Sample) getIntent().getExtras().getSerializable(EXTRA_SAMPLE);\n        type = getIntent().getExtras().getInt(EXTRA_TYPE);\n        binding.setTransition3Sample(sample);\n    }\n\n    private void setupWindowAnimations() {\n        Transition transition;\n\n        if (type == TYPE_PROGRAMMATICALLY) {\n            transition = buildEnterTransition();\n        }  else {\n            transition = TransitionInflater.from(this).inflateTransition(R.transition.slide_from_bottom);\n        }\n        getWindow().setEnterTransition(transition);\n    }\n\n    private void setupLayout() {\n        findViewById(R.id.exit_button).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                finishAfterTransition();\n            }\n        });\n    }\n\n    private Visibility buildEnterTransition() {\n        Slide enterTransition = new Slide();\n        enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));\n        enterTransition.setSlideEdge(Gravity.RIGHT);\n        return enterTransition;\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/java/com/lgvalle/material_animations/TransitionHelper.java",
    "content": "/*\n * Copyright 2015 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.lgvalle.material_animations;\n\nimport android.app.Activity;\nimport android.support.annotation.NonNull;\nimport android.support.annotation.Nullable;\nimport android.support.v4.util.Pair;\nimport android.view.View;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\n/**\n * Helper class for creating content transitions used with {@link android.app.ActivityOptions}.\n */\nclass TransitionHelper {\n\n    /**\n     * Create the transition participants required during a activity transition while\n     * avoiding glitches with the system UI.\n     *\n     * @param activity The activity used as start for the transition.\n     * @param includeStatusBar If false, the status bar will not be added as the transition\n     *        participant.\n     * @return All transition participants.\n     */\n    public static Pair<View, String>[] createSafeTransitionParticipants(@NonNull Activity activity,\n                                                          boolean includeStatusBar, @Nullable Pair... otherParticipants) {\n        // Avoid system UI glitches as described here:\n        // https://plus.google.com/+AlexLockwood/posts/RPtwZ5nNebb\n        View decor = activity.getWindow().getDecorView();\n        View statusBar = null;\n        if (includeStatusBar) {\n            statusBar = decor.findViewById(android.R.id.statusBarBackground);\n        }\n        View navBar = decor.findViewById(android.R.id.navigationBarBackground);\n\n        // Create pair of transition participants.\n        List<Pair> participants = new ArrayList<>(3);\n        addNonNullViewToTransitionParticipants(statusBar, participants);\n        addNonNullViewToTransitionParticipants(navBar, participants);\n        // only add transition participants if there's at least one none-null element\n        if (otherParticipants != null && !(otherParticipants.length == 1\n                && otherParticipants[0] == null)) {\n            participants.addAll(Arrays.asList(otherParticipants));\n        }\n        return participants.toArray(new Pair[participants.size()]);\n    }\n\n    private static void addNonNullViewToTransitionParticipants(View view, List<Pair> participants) {\n        if (view == null) {\n            return;\n        }\n        participants.add(new Pair<>(view, view.getTransitionName()));\n    }\n\n}\n"
  },
  {
    "path": "app/src/main/res/drawable/circle_24dp.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\"24dp\"\n        android:viewportWidth=\"24.0\"\n        android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M12,12m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0\"/>\n</vector>\n"
  },
  {
    "path": "app/src/main/res/drawable/square.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n\n    <padding\n        android:left=\"10dp\"\n        android:top=\"10dp\"\n        android:right=\"10dp\"\n        android:bottom=\"10dp\" />\n    <solid android:color=\"@android:color/white\" />\n    <size\n        android:width=\"3dp\"\n        android:height=\"3dp\" />\n</shape>"
  },
  {
    "path": "app/src/main/res/layout/activity_animations1.xml",
    "content": "<layout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\">\n\n    <data>\n\n        <variable\n            name=\"animationsSample\"\n            type=\"com.lgvalle.material_animations.Sample\" />\n    </data>\n\n    <LinearLayout\n        android:id=\"@+id/sample3_root\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"vertical\">\n\n        <android.support.v7.widget.Toolbar\n            android:id=\"@+id/toolbar\"\n            style=\"@style/MaterialAnimations.TextAppearance.Title\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"?android:attr/actionBarSize\"\n            android:background=\"?android:colorPrimary\"\n            android:elevation=\"@dimen/elevation_header\">\n\n            <TextView\n                android:id=\"@+id/title\"\n                style=\"@style/MaterialAnimations.TextAppearance.Title.Inverse\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_vertical|start\"\n                android:text=\"@{animationsSample.name}\" />\n\n        </android.support.v7.widget.Toolbar>\n\n        <ImageView\n            android:id=\"@+id/square_green\"\n            style=\"@style/MaterialAnimations.Icon.Big\"\n            android:src=\"@drawable/circle_24dp\"\n            app:colorTint=\"@{animationsSample.color}\" />\n\n\n        <TextView\n            android:id=\"@+id/sample_title\"\n            style=\"@style/Base.TextAppearance.AppCompat.Large\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Animations\" />\n\n        <TextView\n            style=\"@style/MaterialAnimations.Text.Body\"\n            android:text=\"Sample Activity demonstrating how to use TransitionManager to animate different view properties\" />\n\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\">\n\n            <Button\n                android:id=\"@+id/sample3_button1\"\n                style=\"@style/MaterialAnimations.Button\"\n                android:layout_weight=\"1\"\n                android:text=\"Change size\" />\n\n            <Button\n                android:id=\"@+id/sample3_button2\"\n                style=\"@style/MaterialAnimations.Button\"\n                android:layout_weight=\"1\"\n                android:text=\"Change position\" />\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/sample3_button3\"\n            style=\"@style/MaterialAnimations.Button\"\n            android:text=\"Next (Scenes)\" />\n\n    </LinearLayout>\n</layout>"
  },
  {
    "path": "app/src/main/res/layout/activity_animations2.xml",
    "content": "<layout xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <data>\n\n        <variable\n            name=\"animationsSample\"\n            type=\"com.lgvalle.material_animations.Sample\" />\n    </data>\n\n    <LinearLayout\n        android:id=\"@+id/sample3_root\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"vertical\">\n\n        <android.support.v7.widget.Toolbar\n            android:id=\"@+id/toolbar\"\n            style=\"@style/MaterialAnimations.TextAppearance.Title\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"?android:attr/actionBarSize\"\n            android:background=\"?android:colorPrimary\"\n            android:elevation=\"@dimen/elevation_header\">\n\n            <TextView\n                android:id=\"@+id/title\"\n                style=\"@style/MaterialAnimations.TextAppearance.Title.Inverse\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_vertical|start\"\n                android:text=\"Scenes\" />\n\n        </android.support.v7.widget.Toolbar>\n\n        <FrameLayout\n            android:id=\"@+id/scene_root\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\" />\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:id=\"@+id/buttons_group\"\n            android:orientation=\"vertical\"\n            android:layout_height=\"match_parent\">\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\">\n\n                <Button\n                    android:id=\"@+id/sample3_button1\"\n                    style=\"@style/MaterialAnimations.Button.Scaled\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Scene one\" />\n\n                <Button\n                    android:id=\"@+id/sample3_button2\"\n                    style=\"@style/MaterialAnimations.Button.Scaled\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Scene two\" />\n            </LinearLayout>\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\">\n\n                <Button\n                    android:id=\"@+id/sample3_button3\"\n                    style=\"@style/MaterialAnimations.Button.Scaled\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Scene three\" />\n\n                <Button\n                    android:id=\"@+id/sample3_button4\"\n                    style=\"@style/MaterialAnimations.Button.Scaled\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Scene four\" />\n            </LinearLayout>\n        </LinearLayout>\n\n    </LinearLayout>\n</layout>"
  },
  {
    "path": "app/src/main/res/layout/activity_animations_scene0.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n\n    <TextView\n        android:id=\"@+id/scene0_title\"\n        style=\"@style/MaterialAnimations.Text.Body\"\n        android:text=\"Scenes store the state of a view hierarchy, including all its views and their property values. The transitions framework can run animations between a starting and an ending scene\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_animations_scene1.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n\n    <ImageView\n        android:id=\"@+id/square_green\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_green\" />\n\n    <ImageView\n        android:id=\"@+id/square_red\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_alignParentRight=\"true\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_red\" />\n\n    <ImageView\n        android:id=\"@+id/square_blue\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_below=\"@+id/square_green\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_blue\" />\n\n    <ImageView\n        android:id=\"@+id/square_yellow\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_below=\"@+id/square_red\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_yellow\" />\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_animations_scene2.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\">\n\n\n    <ImageView\n        android:id=\"@+id/square_green\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:src=\"@drawable/circle_24dp\"\n        android:layout_alignParentRight=\"true\"\n        android:tint=\"@color/sample_green\" />\n\n    <ImageView\n        android:id=\"@+id/square_blue\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_blue\" />\n\n    <ImageView\n        android:id=\"@+id/square_red\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_below=\"@+id/square_green\"\n        android:layout_alignParentRight=\"true\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_red\" />\n\n    <ImageView\n        android:id=\"@+id/square_yellow\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_below=\"@+id/square_blue\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_yellow\" />\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_animations_scene3.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\">\n\n\n    <ImageView\n        android:id=\"@+id/square_green\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_below=\"@id/square_blue\"\n        android:layout_alignParentRight=\"true\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_green\" />\n\n    <ImageView\n        android:id=\"@+id/square_blue\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_alignParentRight=\"true\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_blue\" />\n\n    <ImageView\n        android:id=\"@+id/square_red\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_below=\"@+id/square_yellow\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_red\" />\n\n    <ImageView\n        android:id=\"@+id/square_yellow\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_yellow\" />\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_animations_scene4.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\">\n\n\n    <ImageView\n        android:id=\"@+id/square_green\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_below=\"@id/square_red\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_green\" />\n\n    <ImageView\n        android:id=\"@+id/square_blue\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:layout_alignParentRight=\"true\"\n        android:layout_below=\"@id/square_yellow\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_blue\" />\n\n    <ImageView\n        android:id=\"@+id/square_red\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:src=\"@drawable/circle_24dp\"\n        android:tint=\"@color/sample_red\" />\n\n    <ImageView\n        android:id=\"@+id/square_yellow\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:src=\"@drawable/circle_24dp\"\n        android:layout_alignParentRight=\"true\"\n        android:tint=\"@color/sample_yellow\" />\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\">\n\n    <android.support.v7.widget.Toolbar\n        android:id=\"@+id/toolbar\"\n        style=\"@style/MaterialAnimations.TextAppearance.Title\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"?android:attr/actionBarSize\"\n        android:background=\"@color/material_animations_primary\"\n        android:elevation=\"@dimen/elevation_header\">\n\n        <TextView\n            android:id=\"@+id/title\"\n            style=\"@style/MaterialAnimations.TextAppearance.Title.Inverse\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_vertical|start\"\n            android:text=\"@string/app_name\" />\n\n    </android.support.v7.widget.Toolbar>\n\n    <android.support.v7.widget.RecyclerView\n        android:id=\"@+id/sample_list\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:scrollbars=\"vertical\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_reveal.xml",
    "content": "<layout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <data>\n\n        <variable\n            name=\"reveal1Sample\"\n            type=\"com.lgvalle.material_animations.Sample\" />\n    </data>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\">\n\n        <android.support.v7.widget.Toolbar\n            android:id=\"@+id/toolbar\"\n            style=\"@style/MaterialAnimations.TextAppearance.Title\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"?android:attr/actionBarSize\"\n            android:background=\"?android:colorPrimary\"\n            android:elevation=\"@dimen/elevation_header\">\n\n            <RelativeLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\">\n\n                <ImageView\n                    android:id=\"@+id/shared_target\"\n                    style=\"@style/MaterialAnimations.Icon.Small\"\n                    android:layout_centerHorizontal=\"true\"\n                    android:src=\"@drawable/circle_24dp\"\n                    android:transitionName=\"@string/transition_reveal1\"\n                    app:colorTint=\"@{reveal1Sample.color}\" />\n\n                <TextView\n                    android:id=\"@+id/title\"\n                    style=\"@style/MaterialAnimations.TextAppearance.Title.Inverse\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_centerVertical=\"true\"\n                    android:layout_gravity=\"center_vertical|start\"\n                    android:text=\"@{reveal1Sample.name}\"\n                    tools:text=\"Title\" />\n            </RelativeLayout>\n\n\n        </android.support.v7.widget.Toolbar>\n\n\n        <RelativeLayout\n            android:id=\"@+id/reveal_root\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:gravity=\"center_horizontal\"\n            android:orientation=\"vertical\">\n\n            <TextView\n                android:id=\"@+id/sample_body\"\n                style=\"@style/MaterialAnimations.Text.Body\"\n                android:text=\"Sample Activity demonstrating how to create different CirculaReveal animations\" />\n\n\n            <ImageView\n                android:id=\"@+id/square_green\"\n                style=\"@style/MaterialAnimations.Icon.Medium.Scaled\"\n                android:layout_alignParentBottom=\"true\"\n                android:src=\"@drawable/circle_24dp\"\n                android:tint=\"@color/sample_green\" />\n\n            <ImageView\n                android:id=\"@+id/square_red\"\n                android:layout_toRightOf=\"@id/square_green\"\n                style=\"@style/MaterialAnimations.Icon.Medium.Scaled\"\n                android:layout_alignParentBottom=\"true\"\n                android:src=\"@drawable/circle_24dp\"\n                android:tint=\"@color/sample_red\" />\n\n            <ImageView\n                android:id=\"@+id/square_blue\"\n                android:layout_toRightOf=\"@id/square_red\"\n                style=\"@style/MaterialAnimations.Icon.Medium.Scaled\"\n                android:layout_alignParentBottom=\"true\"\n                android:src=\"@drawable/circle_24dp\"\n                android:tint=\"@color/sample_blue\" />\n\n            <ImageView\n                android:id=\"@+id/square_yellow\"\n                android:layout_toRightOf=\"@id/square_blue\"\n                style=\"@style/MaterialAnimations.Icon.Medium.Scaled\"\n                android:layout_alignParentBottom=\"true\"\n                android:src=\"@drawable/circle_24dp\"\n                android:tint=\"@color/sample_yellow\" />\n        </RelativeLayout>\n\n    </LinearLayout>\n</layout>"
  },
  {
    "path": "app/src/main/res/layout/activity_sharedelement.xml",
    "content": "<layout xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <data>\n\n        <variable\n            name=\"sharedSample\"\n            type=\"com.lgvalle.material_animations.Sample\" />\n    </data>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"vertical\">\n\n        <android.support.v7.widget.Toolbar\n            android:id=\"@+id/toolbar\"\n            style=\"@style/MaterialAnimations.TextAppearance.Title\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"?android:attr/actionBarSize\"\n            android:background=\"?android:colorPrimary\"\n            android:elevation=\"@dimen/elevation_header\">\n\n            <TextView\n                android:id=\"@+id/title\"\n                style=\"@style/MaterialAnimations.TextAppearance.Title.Inverse\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_vertical|start\"\n                android:text=\"@{sharedSample.name}\"\n                android:transitionName=\"@string/sample_blue_title\" />\n\n        </android.support.v7.widget.Toolbar>\n\n        <TextView\n            style=\"@style/MaterialAnimations.Text.Body\"\n            android:text=\"Toolbar title is a shared element between MainActivity and this activity\" />\n\n        <FrameLayout\n            android:id=\"@+id/sample2_content\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\" />\n\n    </LinearLayout>\n</layout>"
  },
  {
    "path": "app/src/main/res/layout/activity_sharedelement_fragment1.xml",
    "content": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center_horizontal\"\n    android:orientation=\"vertical\">\n\n    <ImageView\n        android:id=\"@+id/square_blue\"\n        style=\"@style/MaterialAnimations.Icon.Big\"\n        android:src=\"@drawable/circle_24dp\"\n        android:transitionName=\"@string/square_blue_name\" />\n\n    <TextView\n        style=\"@style/Base.TextAppearance.AppCompat.Large\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Fragment 1\" />\n\n    <TextView\n        style=\"@style/MaterialAnimations.Text.Body\"\n        android:text=\"Blue circle is a shared element between MainActivity and this fragment.\" />\n\n\n    <Button\n        android:id=\"@+id/sample2_button1\"\n        android:text=\"Next (Overlap transition = false)\"\n        style=\"@style/MaterialAnimations.Button\" />\n\n    <Button\n        android:id=\"@+id/sample2_button2\"\n        android:text=\"Next (Overlap transition =  true)\"\n        style=\"@style/MaterialAnimations.Button\" />\n\n</LinearLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_sharedelement_fragment2.xml",
    "content": "<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:gravity=\"center_horizontal|top\"\n    android:orientation=\"vertical\">\n\n    <ImageView\n        android:id=\"@+id/square_blue\"\n        style=\"@style/MaterialAnimations.Icon.Small\"\n        android:src=\"@drawable/circle_24dp\"\n        android:transitionName=\"@string/square_blue_name\" />\n\n    <TextView\n        style=\"@style/Base.TextAppearance.AppCompat.Large\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"match_parent\"\n        android:layout_alignBottom=\"@+id/square_blue\"\n        android:layout_alignTop=\"@+id/square_blue\"\n        android:layout_gravity=\"center_vertical|center_horizontal\"\n        android:layout_toEndOf=\"@+id/square_blue\"\n        android:gravity=\"center_horizontal|center_vertical\"\n        android:text=\"Fragment 2\" />\n\n\n    <TextView\n        android:id=\"@+id/fragment2_body1\"\n        style=\"@style/MaterialAnimations.Text.Body\"\n        android:layout_below=\"@+id/square_blue\"\n        android:layout_centerHorizontal=\"true\"\n        android:text=\"Blue circle is a shared element between two fragments\" />\n\n    <TextView\n        android:id=\"@+id/fragment2_title\"\n        style=\"@style/MaterialAnimations.Text.Body\"\n        android:textStyle=\"bold\"\n        android:layout_below=\"@+id/fragment2_body1\"\n        android:text=\"Overlap\" />\n\n    <TextView\n        style=\"@style/MaterialAnimations.Text.Body\"\n        android:layout_below=\"@+id/fragment2_title\"\n        android:layout_centerHorizontal=\"true\"\n        android:text=\"When true, the enter transition will start as soon as possible. When false, the enter transition will wait until the exit transition completes before starting.\" />\n\n</RelativeLayout>"
  },
  {
    "path": "app/src/main/res/layout/activity_transition1.xml",
    "content": "<layout xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <data>\n\n        <variable\n            name=\"transition1Sample\"\n            type=\"com.lgvalle.material_animations.Sample\" />\n    </data>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"vertical\">\n\n\n        <android.support.v7.widget.Toolbar\n            android:id=\"@+id/toolbar\"\n            style=\"@style/MaterialAnimations.TextAppearance.Title\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"?android:attr/actionBarSize\"\n            android:background=\"?android:colorPrimary\"\n            android:elevation=\"@dimen/elevation_header\">\n\n            <TextView\n                android:id=\"@+id/title\"\n                style=\"@style/MaterialAnimations.TextAppearance.Title.Inverse\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_vertical|start\"\n                android:text='@{transition1Sample.name}' />\n\n        </android.support.v7.widget.Toolbar>\n\n        <TextView\n            style=\"@style/MaterialAnimations.Text.Body\"\n            android:text=\"This activity defines a Explode Enter Transition programmatically. Transitions can be defined either on code or on xml resource files\" />\n\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/sample1_button1\"\n                style=\"@style/MaterialAnimations.Button\"\n                android:layout_weight=\"1\"\n                android:text=\"Explode (Code)\" />\n\n            <Button\n                android:id=\"@+id/sample1_button2\"\n                style=\"@style/MaterialAnimations.Button\"\n                android:layout_weight=\"1\"\n                android:text=\"Explode (XML)\" />\n\n        </LinearLayout>\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/sample1_button3\"\n                style=\"@style/MaterialAnimations.Button\"\n                android:layout_weight=\"1\"\n                android:text=\"Slide (Code)\" />\n\n            <Button\n                android:id=\"@+id/sample1_button4\"\n                style=\"@style/MaterialAnimations.Button\"\n                android:layout_weight=\"1\"\n                android:text=\"Slide (XML)\" />\n        </LinearLayout>\n\n        <Button\n            android:id=\"@+id/sample1_button6\"\n            style=\"@style/MaterialAnimations.Button\"\n            android:text=\"Exit\" />\n\n        <Button\n            android:id=\"@+id/sample1_button5\"\n            style=\"@style/MaterialAnimations.Button\"\n            android:text=\"Exit (overriding return transition)\" />\n\n    </LinearLayout>\n</layout>"
  },
  {
    "path": "app/src/main/res/layout/activity_transition2.xml",
    "content": "<layout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\">\n\n    <data>\n\n        <variable\n            name=\"transition2Sample\"\n            type=\"com.lgvalle.material_animations.Sample\" />\n    </data>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"vertical\">\n\n\n        <android.support.v7.widget.Toolbar\n            android:id=\"@+id/toolbar\"\n            style=\"@style/MaterialAnimations.TextAppearance.Title\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"?android:attr/actionBarSize\"\n            android:background=\"?android:colorPrimary\"\n            android:elevation=\"@dimen/elevation_header\">\n\n            <TextView\n                android:id=\"@+id/title\"\n                style=\"@style/MaterialAnimations.TextAppearance.Title.Inverse\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_vertical|start\"\n                android:text=\"@{transition2Sample.name}\" />\n\n        </android.support.v7.widget.Toolbar>\n\n        <ImageView\n            android:id=\"@+id/square_red\"\n            style=\"@style/MaterialAnimations.Icon.Big\"\n            android:src=\"@drawable/circle_24dp\"\n            app:colorTint=\"@{transition2Sample.color}\" />\n\n        <TextView\n            android:id=\"@+id/activity_title\"\n            style=\"@style/Base.TextAppearance.AppCompat.Large\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Explode\" />\n\n        <TextView\n            style=\"@style/MaterialAnimations.Text.Body\"\n            android:text=\"@string/medium_text\" />\n\n        <Button\n            android:id=\"@+id/exit_button\"\n            style=\"@style/MaterialAnimations.Button\"\n            android:text=\"Exit\" />\n\n\n    </LinearLayout>\n</layout>"
  },
  {
    "path": "app/src/main/res/layout/activity_transition3.xml",
    "content": "<layout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\">\n\n    <data>\n\n        <variable\n            name=\"transition3Sample\"\n            type=\"com.lgvalle.material_animations.Sample\" />\n    </data>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:gravity=\"center_horizontal\"\n        android:orientation=\"vertical\">\n\n\n        <android.support.v7.widget.Toolbar\n            android:id=\"@+id/toolbar\"\n            style=\"@style/MaterialAnimations.TextAppearance.Title\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"?android:attr/actionBarSize\"\n            android:background=\"?android:colorPrimary\"\n            android:elevation=\"@dimen/elevation_header\">\n\n            <TextView\n                android:id=\"@+id/title\"\n                style=\"@style/MaterialAnimations.TextAppearance.Title.Inverse\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center_vertical|start\"\n                android:text=\"@{transition3Sample.name}\" />\n\n        </android.support.v7.widget.Toolbar>\n\n        <ImageView\n            android:id=\"@+id/square_red\"\n            style=\"@style/MaterialAnimations.Icon.Big\"\n            android:src=\"@drawable/circle_24dp\"\n            app:colorTint=\"@{transition3Sample.color}\" />\n\n        <TextView\n            android:id=\"@+id/activity_title\"\n            style=\"@style/Base.TextAppearance.AppCompat.Large\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Slide\" />\n\n        <TextView\n            style=\"@style/MaterialAnimations.Text.Body\"\n            android:text=\"@string/medium_text\" />\n\n        <Button\n            android:id=\"@+id/exit_button\"\n            android:text=\"Exit\"\n            style=\"@style/MaterialAnimations.Button\" />\n\n\n\n\n    </LinearLayout>\n</layout>"
  },
  {
    "path": "app/src/main/res/layout/row_sample.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <data>\n\n        <variable\n            name=\"sample\"\n            type=\"com.lgvalle.material_animations.Sample\" />\n    </data>\n\n    <LinearLayout\n        android:id=\"@+id/sample_layout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_vertical\"\n        android:clipToPadding=\"false\"\n        android:orientation=\"horizontal\"\n        android:padding=\"@dimen/spacing_double\">\n\n        <ImageView\n            android:id=\"@+id/sample_icon\"\n            style=\"@style/MaterialAnimations.Icon.Small\"\n            android:src=\"@drawable/circle_24dp\"\n            app:colorTint=\"@{sample.color}\" />\n\n        <TextView\n            android:id=\"@+id/sample_name\"\n            style=\"@style/Base.TextAppearance.AppCompat.Large\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@{sample.name}\"\n            tools:text=\"View animations sample\" />\n\n    </LinearLayout>\n</layout>"
  },
  {
    "path": "app/src/main/res/layout/square.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<View xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_margin=\"10dp\"\n    android:id=\"@+id/square_green\"\n    android:layout_width=\"50dp\"\n    android:background=\"@android:color/holo_green_light\"\n    android:layout_height=\"50dp\" />\n\n"
  },
  {
    "path": "app/src/main/res/menu/menu_main.xml",
    "content": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\" tools:context=\".MainActivity\">\n    <item android:id=\"@+id/action_settings\" android:title=\"@string/action_settings\"\n        android:orderInCategory=\"100\" app:showAsAction=\"never\" />\n</menu>\n"
  },
  {
    "path": "app/src/main/res/transition/changebounds_with_arcmotion.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<transitionSet xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"@integer/anim_duration_long\"\n    android:interpolator=\"@android:interpolator/decelerate_cubic\"\n    >\n    <changeBounds>\n        <!--patternPathMotion android:patternPathData=\"M0 0 L0 100 L100 0\"/-->\n        <arcMotion\n            android:maximumAngle=\"90\"\n            android:minimumHorizontalAngle=\"90\"\n            android:minimumVerticalAngle=\"0\" />\n\n    </changeBounds>\n</transitionSet>"
  },
  {
    "path": "app/src/main/res/transition/explode.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<transitionSet xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <explode\n        android:duration=\"@integer/anim_duration_long\"\n        android:interpolator=\"@android:interpolator/bounce\" />\n</transitionSet>"
  },
  {
    "path": "app/src/main/res/transition/slide_and_changebounds.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<transitionSet xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"@integer/anim_duration_long\">\n    <slide />\n    <changeBounds />\n</transitionSet>"
  },
  {
    "path": "app/src/main/res/transition/slide_and_changebounds_sequential.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<transitionSet xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"@integer/anim_duration_long\"\n    android:transitionOrdering=\"sequential\">\n    <slide />\n    <changeBounds />\n</transitionSet>"
  },
  {
    "path": "app/src/main/res/transition/slide_and_changebounds_sequential_with_interpolators.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<transitionSet xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:duration=\"@integer/anim_duration_long\"\n    android:transitionOrdering=\"sequential\">\n    <slide android:interpolator=\"@android:interpolator/decelerate_cubic\" />\n    <changeBounds android:interpolator=\"@android:interpolator/bounce\" />\n</transitionSet>"
  },
  {
    "path": "app/src/main/res/transition/slide_from_bottom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<transitionSet xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <slide\n        android:duration=\"@integer/anim_duration_long\"\n        android:slideEdge=\"bottom\" />\n</transitionSet>"
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  ~ Copyright 2015 Google Inc.\n  ~\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~      http://www.apache.org/licenses/LICENSE-2.0\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n<resources>\n    <color name=\"touch_effect\">#9ccc</color>\n\n    <color name=\"material_animations_primary\">#039BE5</color>\n    <color name=\"material_animations_primary_dark\">#0277BD</color>\n    <color name=\"material_animations_blank\">#424242</color>\n    <color name=\"material_animations_accent\">#3F51B5</color>\n\n    <color name=\"text_light\">@android:color/white</color>\n    <color name=\"text_dark\">#616161</color>\n\n    <color name=\"sample_red\">#ff4444</color>\n    <color name=\"sample_blue\">#33b5e5</color>\n    <color name=\"sample_green\">#669900</color>\n    <color name=\"sample_yellow\">#ff8800</color>\n\n\n    <!-- theme colors -->\n    <color name=\"theme_blue_background\">#84ffff</color>\n    <color name=\"theme_blue_primary\">#4FC3F7</color>\n    <color name=\"theme_blue_accent\">#ff193a</color>\n    <color name=\"theme_blue_text\">@color/text_dark</color>\n    <color name=\"theme_blue_text_inverse\">@android:color/black</color>\n    <color name=\"theme_blue_primary_dark\">#039BE5</color>\n\n    <color name=\"theme_green_background\">#b9f6ca</color>\n    <color name=\"theme_green_primary\">#669900</color>\n    <color name=\"theme_green_accent\">#e919ff</color>\n    <color name=\"theme_green_text\">@color/text_dark</color>\n    <color name=\"theme_green_primary_dark\">#558B2F</color>\n\n    <color name=\"theme_purple_background\">#b388ff</color>\n    <color name=\"theme_purple_primary\">#7e57c2</color>\n    <color name=\"theme_purple_accent\">#ff9419</color>\n    <color name=\"theme_purple_text\">@color/text_light</color>\n    <color name=\"theme_purple_primary_dark\">#6c4aa6</color>\n\n    <color name=\"theme_red_background\">#ff8a80</color>\n    <color name=\"theme_red_primary\">#ff5252</color>\n    <color name=\"theme_red_accent\">#fffc19</color>\n    <color name=\"theme_red_text\">@color/text_light</color>\n    <color name=\"theme_red_primary_dark\">#e64a4a</color>\n\n    <color name=\"theme_yellow_background\">#ffff8d</color>\n    <color name=\"theme_yellow_primary\">#ff8800</color>\n    <color name=\"theme_yellow_accent\">#19dcff</color>\n    <color name=\"theme_yellow_text\">@color/text_dark</color>\n    <color name=\"theme_yellow_primary_dark\">#EF6C00</color>\n\n    <color name=\"green\">#00e676</color>\n    <color name=\"red\">#ff5252</color>\n    <color name=\"light_grey\">#E0E0E0</color>\n\n\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/dimens.xml",
    "content": "<resources>\n    <!-- Default screen margins, per the Android Design guidelines. -->\n    <dimen name=\"spacing_micro\">4dp</dimen>\n    <dimen name=\"spacing_normal\">8dp</dimen>\n    <dimen name=\"spacing_double\">16dp</dimen>\n    <dimen name=\"spacing_huge\">72dp</dimen>\n\n\n    <dimen name=\"elevation_header\">4dp</dimen>\n    <dimen name=\"elevation_fab\">8dp</dimen>\n\n    <dimen name=\"size_icon_toolbar\">40dp</dimen>\n\n    <integer name=\"anim_duration_very_long\">1500</integer>\n    <integer name=\"anim_duration_long\">500</integer>\n    <integer name=\"anim_duration_medium\">300</integer>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Material-Animations</string>\n\n    <string name=\"hello_world\">Hello world!</string>\n    <string name=\"action_settings\">Settings</string>\n\n    <string name=\"square_red_name\">square_red</string>\n    <string name=\"square_blue_name\">square_blue</string>\n    <string name=\"square_green_name\">square_green</string>\n    <string name=\"transition_reveal1\">transition_reveal1</string>\n\n    <string name=\"sample_blue_title\">sample_blue_title</string>\n    <string name=\"long_text\">Bacon ipsum dolor amet cupidatat bresaola minim, aliquip beef aute ea porchetta. Meatball brisket do, rump in beef ea ham hock spare ribs mollit qui dolore ipsum voluptate cow. Drumstick prosciutto salami duis jerky jowl. Mollit ball tip short ribs doner fugiat frankfurter leberkas andouille kevin pork loin nostrud ham culpa. Rump pariatur ham hock excepteur picanha pork. Corned beef flank proident shankle rump.</string>\n    <string name=\"medium_text\">Porchetta landjaeger tail meatball t-bone spare ribs. Sirloin pork chop bacon pork belly strip steak. Porchetta ham meatball pig salami short ribs jowl spare ribs sirloin tongue jerky cupim chuck.</string>\n    <string name=\"reveal_body1\">Circular Reveal Animation starting from the center of target view</string>\n    <string name=\"reveal_body2\">Circular Reveal Animation starting from touch coordinates</string>\n    <string name=\"reveal_body3\">View layout change animation with Circular Reveal Animation on finish</string>\n    <string name=\"reveal_body4\">Circular Reveal Animation from top with nested animations on end</string>\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n\n    <style name=\"MaterialAnimations\" parent=\"@style/Theme.AppCompat.Light.NoActionBar\">\n        <item name=\"android:colorPrimary\">@color/material_animations_primary</item>\n        <item name=\"android:colorPrimaryDark\">@color/material_animations_primary_dark</item>\n        <item name=\"android:colorAccent\">@color/material_animations_accent</item>\n        <item name=\"android:textColorPrimary\">@android:color/black</item>\n        <item name=\"android:textColorPrimaryInverse\">@color/text_light</item>\n        <item name=\"android:statusBarColor\">@color/material_animations_primary_dark</item>\n        <item name=\"android:textColor\">@color/text_dark</item>\n        <item name=\"android:windowContentTransitions\">true</item>\n        <item name=\"android:windowAllowEnterTransitionOverlap\">false</item>\n        <item name=\"android:windowAllowReturnTransitionOverlap\">false</item>\n        <item name=\"android:titleTextAppearance\">@style/MaterialAnimations.TextAppearance.Title\n        </item>\n        <item name=\"android:windowBackground\">@color/light_grey</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Red\" parent=\"MaterialAnimations\">\n        <item name=\"android:colorPrimary\">@color/theme_red_primary</item>\n        <item name=\"android:colorPrimaryDark\">@color/theme_red_primary</item>\n        <item name=\"android:textColorPrimary\">@color/theme_red_text</item>\n        <item name=\"android:statusBarColor\">@color/theme_red_primary_dark</item>\n        <item name=\"android:windowBackground\">@color/theme_red_background</item>\n        <item name=\"android:colorAccent\">@color/theme_red_accent</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Blue\" parent=\"MaterialAnimations\">\n        <item name=\"android:colorPrimary\">@color/theme_blue_primary</item>\n        <item name=\"android:colorPrimaryDark\">@color/theme_blue_primary_dark</item>\n        <item name=\"android:textColorPrimary\">@color/theme_blue_text</item>\n        <item name=\"android:textColorPrimaryInverse\">@color/theme_blue_text_inverse</item>\n        <item name=\"android:statusBarColor\">@color/theme_blue_primary_dark</item>\n        <item name=\"android:windowBackground\">@color/theme_blue_background</item>\n        <item name=\"android:colorAccent\">@color/theme_blue_accent</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Green\" parent=\"MaterialAnimations\">\n        <item name=\"android:colorPrimary\">@color/theme_green_primary</item>\n        <item name=\"android:colorPrimaryDark\">@color/theme_green_primary</item>\n        <item name=\"android:textColorPrimary\">@color/theme_green_text</item>\n        <item name=\"android:statusBarColor\">@color/theme_green_primary_dark</item>\n        <item name=\"android:windowBackground\">@color/theme_green_background</item>\n        <item name=\"android:colorAccent\">@color/theme_green_accent</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Yellow\" parent=\"MaterialAnimations\">\n        <item name=\"android:colorPrimary\">@color/theme_yellow_primary</item>\n        <item name=\"android:colorPrimaryDark\">@color/theme_yellow_primary</item>\n        <item name=\"android:textColorPrimary\">@color/theme_yellow_text</item>\n        <item name=\"android:statusBarColor\">@color/theme_yellow_primary_dark</item>\n        <item name=\"android:windowBackground\">@color/theme_yellow_background</item>\n        <item name=\"android:colorAccent\">@color/theme_yellow_accent</item>\n    </style>\n\n    <style name=\"MaterialAnimations.TextAppearance.Title\" parent=\"android:TextAppearance.Material.Title\">\n        <item name=\"android:textColor\">?android:textColorPrimary</item>\n    </style>\n\n    <style name=\"MaterialAnimations.TextAppearance.Title.Inverse\" parent=\"android:TextAppearance.Material.Title\">\n        <item name=\"android:textColor\">?android:textColorPrimaryInverse</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Text.Body\" parent=\"Base.TextAppearance.AppCompat.Medium\">\n        <item name=\"android:layout_width\">wrap_content</item>\n        <item name=\"android:layout_height\">wrap_content</item>\n        <item name=\"android:layout_margin\">@dimen/spacing_normal</item>\n        <item name=\"android:padding\">@dimen/spacing_normal</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Text.Section\" parent=\"Base.TextAppearance.AppCompat.Caption\">\n        <item name=\"android:layout_width\">wrap_content</item>\n        <item name=\"android:layout_height\">wrap_content</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Icon\">\n        <item name=\"android:layout_margin\">10dp</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Icon.Big\">\n        <item name=\"android:layout_width\">150dp</item>\n        <item name=\"android:layout_height\">150dp</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Icon.Medium\">\n        <item name=\"android:layout_width\">84dp</item>\n        <item name=\"android:layout_margin\">2dp</item>\n        <item name=\"android:layout_height\">84dp</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Icon.Medium.Scaled\" parent=\"MaterialAnimations.Icon.Medium\">\n        <item name=\"android:alpha\">0</item>\n        <item name=\"android:scaleX\">0.5</item>\n        <item name=\"android:scaleY\">0.5</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Icon.Small\">\n        <item name=\"android:layout_width\">48dp</item>\n        <item name=\"android:layout_height\">48dp</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Button\" parent=\"Base.Widget.AppCompat.Button\">\n        <item name=\"android:layout_width\">match_parent</item>\n        <item name=\"android:layout_height\">wrap_content</item>\n        <item name=\"android:layout_margin\">@dimen/spacing_normal</item>\n    </style>\n\n    <style name=\"MaterialAnimations.Button.Scaled\" parent=\"MaterialAnimations.Button\">\n        <item name=\"android:scaleX\">0</item>\n        <item name=\"android:scaleY\">0</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "app/src/main/res/values-w820dp/dimens.xml",
    "content": "<resources>\n    <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n         (such as screen margins) for screens with more than 820dp of available width. This\n         would include 7\" and 10\" devices in landscape (~960dp and ~1280dp respectively). -->\n    <dimen name=\"activity_horizontal_margin\">64dp</dimen>\n</resources>\n"
  },
  {
    "path": "build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:1.5.0'\n\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "#Wed Apr 10 15:27:10 PDT 2013\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-2.10-all.zip\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windowz variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\nif \"%@eval[2+2]\" == \"4\" goto 4NT_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\ngoto execute\n\n:4NT_args\n@rem Get arguments from the 4NT Shell from JP Software\nset CMD_LINE_ARGS=%$\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "settings.gradle",
    "content": "include ':app'\n"
  }
]