├── .gitignore
├── .idea
├── codeStyles
├── compiler.xml
├── gradle.xml
├── jarRepositories.xml
├── misc.xml
├── runConfigurations.xml
└── vcs.xml
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── rodrigodominguez
│ │ └── mixanimationsmotionlayout
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── rodrigodominguez
│ │ │ └── mixanimationsmotionlayout
│ │ │ ├── MainActivity.kt
│ │ │ ├── carouselhelper
│ │ │ └── CarouselHelperActivity.kt
│ │ │ ├── circularcards
│ │ │ ├── CircularCardsDemoActivity.kt
│ │ │ ├── CircularCardsHomeActivity.kt
│ │ │ ├── CreditCardModel.kt
│ │ │ ├── CreditCardsModel.kt
│ │ │ ├── CreditCardsViewModel.kt
│ │ │ └── scenes
│ │ │ │ ├── CircularCardsScene1Activity.kt
│ │ │ │ ├── CircularCardsScene2Activity.kt
│ │ │ │ ├── CircularCardsScene3Activity.kt
│ │ │ │ ├── CircularCardsScene4Activity.kt
│ │ │ │ └── CircularCardsScene5Activity.kt
│ │ │ ├── democonstraintset
│ │ │ ├── CustomAttributeDemoActivity.kt
│ │ │ ├── DemoConstraintSetActivity.kt
│ │ │ ├── LayoutDemoActivity.kt
│ │ │ ├── MotionDemoActivity.kt
│ │ │ ├── PropertySetDemoActivity.kt
│ │ │ └── TransformDemoActivity.kt
│ │ │ ├── examplekeyposition
│ │ │ ├── KeyPositionDeltaActivity.kt
│ │ │ ├── KeyPositionParentActivity.kt
│ │ │ ├── KeyPositionPathActivity.kt
│ │ │ └── PositionKeyExampleActivity.kt
│ │ │ ├── flow
│ │ │ └── FlowDemoActivity.kt
│ │ │ ├── horizontalcarousel
│ │ │ ├── CreditCardsHorizontalModel.kt
│ │ │ ├── CreditCardsHorizontalViewModel.kt
│ │ │ └── HorizontalCarouselActivity.kt
│ │ │ ├── menuselection
│ │ │ └── MenuSelectionCarouselActivity.kt
│ │ │ ├── modopay
│ │ │ └── ModoPaymentActivity.kt
│ │ │ ├── motionwithar
│ │ │ └── MotionAndAugmentedRealityActivity.kt
│ │ │ ├── pillcards
│ │ │ ├── PillCardModel.kt
│ │ │ ├── PillCardsActivity.kt
│ │ │ └── PillCardsViewModel.kt
│ │ │ ├── pivotrotation
│ │ │ └── FoodCircleTabsActivity.kt
│ │ │ ├── rotationcard
│ │ │ ├── RotationCardDemoActivity.kt
│ │ │ ├── RotationCardHomeActivity.kt
│ │ │ └── scenes
│ │ │ │ ├── RotationCardScene1Activity.kt
│ │ │ │ └── RotationCardScene2Activity.kt
│ │ │ ├── sampleskeycycle
│ │ │ └── KeyCycleSampleActivity.kt
│ │ │ ├── sensor
│ │ │ └── CardSensorActivity.kt
│ │ │ ├── starbucks
│ │ │ ├── ItemsStarbucksAdapter.kt
│ │ │ ├── StarbucksDetailActivity.kt
│ │ │ └── data
│ │ │ │ └── Product.kt
│ │ │ ├── storiesinstagram
│ │ │ ├── InstagramStoryDemoActivity.kt
│ │ │ ├── InstagramStoryHomeActivity.kt
│ │ │ ├── StoriesViewModel.kt
│ │ │ ├── Story.kt
│ │ │ ├── StoryModel.kt
│ │ │ └── scenes
│ │ │ │ ├── InstagramStoryScene1Activity.kt
│ │ │ │ ├── InstagramStoryScene2Activity.kt
│ │ │ │ ├── InstagramStoryScene3Activity.kt
│ │ │ │ └── InstagramStoryScene4Activity.kt
│ │ │ ├── telegramheaderdemo
│ │ │ └── TelegramHeaderDemoActivity.kt
│ │ │ ├── testbutton
│ │ │ └── TestButtonActivity.kt
│ │ │ ├── verticalsnake
│ │ │ └── VerticalSnakeActivity.kt
│ │ │ └── verticalstackcards
│ │ │ ├── Card.kt
│ │ │ ├── VerticalCardModel.kt
│ │ │ ├── VerticalStackCardViewModel.kt
│ │ │ ├── VerticalStackCardsDemoActivity.kt
│ │ │ ├── VerticalStackCardsHomeActivity.kt
│ │ │ └── scenes
│ │ │ ├── VerticalStackCardsScene1Activity.kt
│ │ │ ├── VerticalStackCardsScene2Activity.kt
│ │ │ └── VerticalStackCardsScene3Activity.kt
│ └── res
│ │ ├── drawable
│ │ ├── arrow_back_24px.xml
│ │ ├── camera_alt_24px.xml
│ │ ├── card_mp.xml
│ │ ├── chip.webp
│ │ ├── coffee_takeaway_outline.xml
│ │ ├── contactless_24px_black.xml
│ │ ├── green_starbucks.jpg
│ │ ├── ic__01_hotdog.xml
│ │ ├── ic__02_yogurt.xml
│ │ ├── ic__03_milk.xml
│ │ ├── ic__04_carrot.xml
│ │ ├── ic__05_sushi.xml
│ │ ├── ic__06_beer.xml
│ │ ├── ic__07_pizza.xml
│ │ ├── ic__08_donut.xml
│ │ ├── ic__09_meat.xml
│ │ ├── ic_arrow_upward_24px.xml
│ │ ├── ic_check_24px.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_launcher_foreground.xml
│ │ ├── ic_visa_inc_logo_black.xml
│ │ ├── mocha.jpg
│ │ ├── more_vert_24px.xml
│ │ ├── send_24px.xml
│ │ ├── shape_circle_blue.xml
│ │ ├── shape_circle_blue_light.xml
│ │ ├── shape_circle_pyg_violet.xml
│ │ ├── shape_circle_pyg_violet_2.xml
│ │ ├── shape_circular.xml
│ │ ├── shape_modo_background.xml
│ │ ├── shape_modo_background_blue.xml
│ │ ├── shape_sheet_starbucks.xml
│ │ ├── shape_size_cup.xml
│ │ └── shape_size_cup_selected.xml
│ │ ├── font
│ │ ├── rubik_black.ttf
│ │ ├── rubik_bold.ttf
│ │ ├── rubik_light.ttf
│ │ ├── rubik_medium.ttf
│ │ └── rubik_regular.ttf
│ │ ├── layout
│ │ ├── activity_carousel_helper.xml
│ │ ├── activity_circular_cards_demo.xml
│ │ ├── activity_circular_cards_home.xml
│ │ ├── activity_circular_cards_scene1.xml
│ │ ├── activity_circular_cards_scene2.xml
│ │ ├── activity_circular_cards_scene3.xml
│ │ ├── activity_circular_cards_scene4.xml
│ │ ├── activity_circular_cards_scene5.xml
│ │ ├── activity_custom_attribute_demo.xml
│ │ ├── activity_demo_constraint_set.xml
│ │ ├── activity_flow_demo.xml
│ │ ├── activity_food_circle_tabs.xml
│ │ ├── activity_food_circle_tabs_ar.xml
│ │ ├── activity_horizontal_carousel.xml
│ │ ├── activity_instagram_story_demo.xml
│ │ ├── activity_instagram_story_home.xml
│ │ ├── activity_instagram_story_scene1.xml
│ │ ├── activity_instagram_story_scene2.xml
│ │ ├── activity_instagram_story_scene3.xml
│ │ ├── activity_instagram_story_scene4.xml
│ │ ├── activity_key_cycle_sample.xml
│ │ ├── activity_key_position_delta.xml
│ │ ├── activity_key_position_parent.xml
│ │ ├── activity_key_position_path.xml
│ │ ├── activity_layout_demo.xml
│ │ ├── activity_main.xml
│ │ ├── activity_menu_selection_carousel.xml
│ │ ├── activity_modo_payment.xml
│ │ ├── activity_motion_and_augmented_reality.xml
│ │ ├── activity_motion_demo.xml
│ │ ├── activity_pill_cards.xml
│ │ ├── activity_position_key_example.xml
│ │ ├── activity_property_set_demo.xml
│ │ ├── activity_rotation_card_demo.xml
│ │ ├── activity_rotation_card_home.xml
│ │ ├── activity_rotation_card_scene1.xml
│ │ ├── activity_rotation_card_scene2.xml
│ │ ├── activity_starbucks_detail.xml
│ │ ├── activity_telegram_header_demo.xml
│ │ ├── activity_test_sensores_android.xml
│ │ ├── activity_transform_demo.xml
│ │ ├── activity_vertical_snake.xml
│ │ ├── activity_vertical_stack_cards_demo.xml
│ │ ├── activity_vertical_stack_cards_home.xml
│ │ ├── activity_vertical_stack_cards_scene1.xml
│ │ ├── activity_vertical_stack_cards_scene2.xml
│ │ ├── activity_vertical_stack_cards_scene3.xml
│ │ ├── credit_card_reverse.xml
│ │ ├── detail_container_starbucks.xml
│ │ ├── item_product_starbucks.xml
│ │ ├── layout_story.xml
│ │ ├── layout_story_two.xml
│ │ └── list_products_motion_layout.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── values
│ │ ├── colors.xml
│ │ ├── dimen.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ ├── styles.xml
│ │ └── themes.xml
│ │ └── xml
│ │ ├── activity_carousel_helper_scene.xml
│ │ ├── activity_circular_cards_demo_scene.xml
│ │ ├── activity_circular_cards_scene1.xml
│ │ ├── activity_circular_cards_scene2.xml
│ │ ├── activity_circular_cards_scene3.xml
│ │ ├── activity_circular_cards_scene4.xml
│ │ ├── activity_circular_cards_scene5.xml
│ │ ├── activity_custom_attribute_demo_scene.xml
│ │ ├── activity_flow_demo_scene.xml
│ │ ├── activity_food_circle_tabs_scene.xml
│ │ ├── activity_horizontal_carousel_scene.xml
│ │ ├── activity_instagram_story_demo_scene.xml
│ │ ├── activity_instagram_story_scene1.xml
│ │ ├── activity_instagram_story_scene2.xml
│ │ ├── activity_instagram_story_scene3.xml
│ │ ├── activity_instagram_story_scene4.xml
│ │ ├── activity_key_cycle_sample_scene.xml
│ │ ├── activity_key_position_delta_scene.xml
│ │ ├── activity_key_position_parent_scene.xml
│ │ ├── activity_key_position_path_scene.xml
│ │ ├── activity_layout_demo_scene.xml
│ │ ├── activity_menu_selection_carousel_scene.xml
│ │ ├── activity_modo_payment_scene.xml
│ │ ├── activity_motion_demo_scene.xml
│ │ ├── activity_pill_cards2_scene.xml
│ │ ├── activity_property_set_demo_scene.xml
│ │ ├── activity_rotation_card_scene1_scene.xml
│ │ ├── activity_rotation_card_scene2_scene.xml
│ │ ├── activity_rotation_card_scene_demo.xml
│ │ ├── activity_starbucks_detail_scene.xml
│ │ ├── activity_telegram_header_scene.xml
│ │ ├── activity_test_sensores_android_scene.xml
│ │ ├── activity_transform_demo_scene.xml
│ │ ├── activity_vertical_snake_scene.xml
│ │ ├── activity_vertical_stack_cards_demo_scene.xml
│ │ ├── activity_vertical_stack_cards_scene1.xml
│ │ ├── activity_vertical_stack_cards_scene2.xml
│ │ ├── activity_vertical_stack_cards_scene3.xml
│ │ ├── layout_story_scene.xml
│ │ └── list_products_motion_layout_scene.xml
│ └── test
│ └── java
│ └── com
│ └── rodrigodominguez
│ └── mixanimationsmotionlayout
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
22 |
23 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 | apply plugin: 'kotlin-android'
3 | apply plugin: 'kotlin-android-extensions'
4 |
5 | android {
6 | compileSdkVersion 29
7 |
8 | defaultConfig {
9 | applicationId "com.rodrigodominguez.mixanimationsmotionlayout"
10 | minSdkVersion 21
11 | targetSdkVersion 29
12 | versionCode 1
13 | versionName "1.0"
14 |
15 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
16 |
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | compileOptions {
26 | sourceCompatibility JavaVersion.VERSION_1_8
27 | targetCompatibility JavaVersion.VERSION_1_8
28 | }
29 | kotlinOptions {
30 | jvmTarget = '1.8'
31 | }
32 |
33 | }
34 |
35 | dependencies {
36 | implementation fileTree(dir: "libs", include: ["*.jar"])
37 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
38 | implementation "androidx.core:core-ktx:$coreKtx"
39 | implementation "androidx.appcompat:appcompat:$appCompat"
40 | implementation "androidx.constraintlayout:constraintlayout:$constraintLayout"
41 | implementation "com.google.android.material:material:$materialComponents"
42 | implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
43 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
44 | implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0"
45 | implementation 'de.hdodenhof:circleimageview:3.1.0'
46 | implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
47 | implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
48 | implementation "com.google.ar.sceneform.ux:sceneform-ux:1.17.1"
49 | implementation 'com.github.bumptech.glide:glide:4.11.0'
50 | annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
51 | }
52 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/rodrigodominguez/mixanimationsmotionlayout/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.rodrigodominguez.mixanimationsmotionlayout", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/carouselhelper/CarouselHelperActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.carouselhelper
2 |
3 | import android.graphics.Color
4 | import android.os.Bundle
5 | import android.view.View
6 | import android.widget.TextView
7 | import androidx.appcompat.app.AppCompatActivity
8 | import androidx.constraintlayout.helper.widget.Carousel
9 | import com.google.android.material.card.MaterialCardView
10 | import com.rodrigodominguez.mixanimationsmotionlayout.R
11 |
12 |
13 | class CarouselHelperActivity : AppCompatActivity() {
14 | var colors = intArrayOf(
15 | Color.parseColor("#ffd54f"),
16 | Color.parseColor("#ffca28"),
17 | Color.parseColor("#ffc107"),
18 | Color.parseColor("#ffb300"),
19 | Color.parseColor("#ffa000"),
20 | Color.parseColor("#ff8f00"),
21 | Color.parseColor("#ff6f00"),
22 | Color.parseColor("#c43e00")
23 | )
24 |
25 | override fun onCreate(savedInstanceState: Bundle?) {
26 | super.onCreate(savedInstanceState)
27 | setContentView(R.layout.activity_carousel_helper)
28 | setupCarousel()
29 | }
30 |
31 |
32 | private fun setupCarousel() {
33 | val carousel = findViewById(R.id.carousel) ?: return
34 | val numImages = colors.size
35 |
36 | carousel.setAdapter(object : Carousel.Adapter {
37 | override fun count(): Int {
38 | return numImages
39 | }
40 |
41 | override fun populate(view: View, index: Int) {
42 | if (view is MaterialCardView) {
43 | view.setBackgroundColor(colors[index])
44 | }
45 | }
46 |
47 | override fun onNewItem(index: Int) {
48 | }
49 | })
50 | }
51 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/circularcards/CircularCardsDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.circularcards
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import androidx.constraintlayout.motion.widget.MotionLayout
6 | import androidx.constraintlayout.motion.widget.TransitionAdapter
7 | import androidx.lifecycle.Observer
8 | import androidx.lifecycle.ViewModelProviders
9 | import com.rodrigodominguez.mixanimationsmotionlayout.R
10 | import kotlinx.android.synthetic.main.activity_circular_cards_demo.*
11 |
12 | class CircularCardsDemoActivity : AppCompatActivity() {
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_circular_cards_demo)
16 | val viewModel = ViewModelProviders
17 | .of(this)
18 | .get(CreditCardsViewModel::class.java)
19 |
20 | viewModel
21 | .modelStream
22 | .observe(this, Observer {
23 | bindCard(it)
24 | })
25 |
26 | motionLayout.setTransitionListener(object : TransitionAdapter() {
27 | override fun onTransitionCompleted(motionLayout: MotionLayout, currentId: Int) {
28 | motionLayout.post {
29 | when (currentId) {
30 | R.id.secondCard -> {
31 | motionLayout.progress = 0f
32 | viewModel.swipeRight()
33 | }
34 | R.id.firstCard -> {
35 | motionLayout.progress = 0f
36 | viewModel.swipeLeft()
37 | }
38 | }
39 | }
40 | }
41 | })
42 | }
43 |
44 | private fun bindCard(it: CreditCardsModel) {
45 | cardLeft1.setCardBackgroundColor(it.cardFourLeft.backgroundColor)
46 | cardLeft2.setCardBackgroundColor(it.cardThreeLeft.backgroundColor)
47 | cardLeft3.setCardBackgroundColor(it.cardTwoLeft.backgroundColor)
48 | cardLeft4.setCardBackgroundColor(it.cardOneLeft.backgroundColor)
49 | cardCenter.setCardBackgroundColor(it.cardCenter.backgroundColor)
50 | cardRight1.setCardBackgroundColor(it.cardOneRight.backgroundColor)
51 | cardRight2.setCardBackgroundColor(it.cardTwoRight.backgroundColor)
52 | cardRight3.setCardBackgroundColor(it.cardThreeRight.backgroundColor)
53 | cardRight4.setCardBackgroundColor(it.cardFourRight.backgroundColor)
54 | }
55 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/circularcards/CircularCardsHomeActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.circularcards
2 |
3 | import android.content.Intent
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import com.rodrigodominguez.mixanimationsmotionlayout.R
7 | import com.rodrigodominguez.mixanimationsmotionlayout.circularcards.scenes.*
8 | import kotlinx.android.synthetic.main.activity_circular_cards_home.*
9 |
10 | class CircularCardsHomeActivity : AppCompatActivity() {
11 | override fun onCreate(savedInstanceState: Bundle?) {
12 | super.onCreate(savedInstanceState)
13 | setContentView(R.layout.activity_circular_cards_home)
14 | circularCardsDemo.setOnClickListener {
15 | startActivity(
16 | Intent(this, CircularCardsDemoActivity::class.java)
17 | )
18 | }
19 |
20 | circularCardsScene1.setOnClickListener {
21 | startActivity(
22 | Intent(this, CircularCardsScene1Activity::class.java)
23 | )
24 | }
25 |
26 | circularCardsScene2.setOnClickListener {
27 | startActivity(
28 | Intent(this, CircularCardsScene2Activity::class.java)
29 | )
30 | }
31 |
32 | circularCardsScene3.setOnClickListener {
33 | startActivity(
34 | Intent(this, CircularCardsScene3Activity::class.java)
35 | )
36 | }
37 |
38 | circularCardsScene4.setOnClickListener {
39 | startActivity(
40 | Intent(this, CircularCardsScene4Activity::class.java)
41 | )
42 | }
43 |
44 | circularCardsScene5.setOnClickListener {
45 | startActivity(
46 | Intent(this, CircularCardsScene5Activity::class.java)
47 | )
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/circularcards/CreditCardModel.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.circularcards
2 |
3 | import androidx.annotation.ColorInt
4 |
5 | data class CreditCardModel(
6 | @ColorInt val backgroundColor: Int
7 | )
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/circularcards/CreditCardsModel.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.circularcards
2 |
3 | data class CreditCardsModel(
4 | val cardOneLeft: CreditCardModel,
5 | val cardTwoLeft: CreditCardModel,
6 | val cardThreeLeft: CreditCardModel,
7 | val cardFourLeft: CreditCardModel,
8 | val cardCenter: CreditCardModel,
9 | val cardOneRight: CreditCardModel,
10 | val cardTwoRight: CreditCardModel,
11 | val cardThreeRight: CreditCardModel,
12 | val cardFourRight: CreditCardModel
13 | )
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/circularcards/scenes/CircularCardsScene1Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.circularcards.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class CircularCardsScene1Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_circular_cards_scene1)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/circularcards/scenes/CircularCardsScene2Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.circularcards.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class CircularCardsScene2Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_circular_cards_scene2)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/circularcards/scenes/CircularCardsScene3Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.circularcards.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class CircularCardsScene3Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_circular_cards_scene3)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/circularcards/scenes/CircularCardsScene4Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.circularcards.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class CircularCardsScene4Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_circular_cards_scene4)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/circularcards/scenes/CircularCardsScene5Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.circularcards.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class CircularCardsScene5Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_circular_cards_scene5)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/democonstraintset/CustomAttributeDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.democonstraintset
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class CustomAttributeDemoActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_custom_attribute_demo)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/democonstraintset/DemoConstraintSetActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.democonstraintset
2 |
3 | import android.content.Intent
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import com.rodrigodominguez.mixanimationsmotionlayout.R
7 | import kotlinx.android.synthetic.main.activity_demo_constraint_set.*
8 |
9 | class DemoConstraintSetActivity : AppCompatActivity() {
10 | override fun onCreate(savedInstanceState: Bundle?) {
11 | super.onCreate(savedInstanceState)
12 | setContentView(R.layout.activity_demo_constraint_set)
13 |
14 | btn_customAttribute.setOnClickListener {
15 | startActivity(Intent(this, CustomAttributeDemoActivity::class.java))
16 | }
17 |
18 | btn_layout.setOnClickListener {
19 | startActivity(Intent(this, LayoutDemoActivity::class.java))
20 | }
21 |
22 | btn_propertySet.setOnClickListener {
23 | startActivity(Intent(this, PropertySetDemoActivity::class.java))
24 | }
25 |
26 | btn_transform.setOnClickListener {
27 | startActivity(Intent(this, TransformDemoActivity::class.java))
28 | }
29 |
30 | btn_motion.setOnClickListener {
31 | startActivity(Intent(this, MotionDemoActivity::class.java))
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/democonstraintset/LayoutDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.democonstraintset
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class LayoutDemoActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_layout_demo)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/democonstraintset/MotionDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.democonstraintset
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class MotionDemoActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_motion_demo)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/democonstraintset/PropertySetDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.democonstraintset
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class PropertySetDemoActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_property_set_demo)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/democonstraintset/TransformDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.democonstraintset
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class TransformDemoActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_transform_demo)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/examplekeyposition/KeyPositionDeltaActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.examplekeyposition
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import androidx.constraintlayout.motion.widget.MotionLayout
6 | import com.rodrigodominguez.mixanimationsmotionlayout.R
7 | import kotlinx.android.synthetic.main.activity_key_position_delta.*
8 |
9 | class KeyPositionDeltaActivity : AppCompatActivity() {
10 | override fun onCreate(savedInstanceState: Bundle?) {
11 | super.onCreate(savedInstanceState)
12 | setContentView(R.layout.activity_key_position_delta)
13 | }
14 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/examplekeyposition/KeyPositionParentActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.examplekeyposition
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class KeyPositionParentActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_key_position_parent)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/examplekeyposition/KeyPositionPathActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.examplekeyposition
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class KeyPositionPathActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_key_position_path)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/examplekeyposition/PositionKeyExampleActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.examplekeyposition
2 |
3 | import android.content.Intent
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import com.rodrigodominguez.mixanimationsmotionlayout.R
7 | import kotlinx.android.synthetic.main.activity_position_key_example.*
8 |
9 | class PositionKeyExampleActivity : AppCompatActivity() {
10 | override fun onCreate(savedInstanceState: Bundle?) {
11 | super.onCreate(savedInstanceState)
12 | setContentView(R.layout.activity_position_key_example)
13 |
14 | keyPositionDelta.setOnClickListener {
15 | startActivity(
16 | Intent(this, KeyPositionDeltaActivity::class.java)
17 | )
18 | }
19 |
20 | keyPositionParent.setOnClickListener {
21 | startActivity(
22 | Intent(this, KeyPositionParentActivity::class.java)
23 | )
24 | }
25 |
26 | keyPositionPath.setOnClickListener {
27 | startActivity(
28 | Intent(this, KeyPositionPathActivity::class.java)
29 | )
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/flow/FlowDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.flow
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class FlowDemoActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_flow_demo)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/horizontalcarousel/CreditCardsHorizontalModel.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.horizontalcarousel
2 |
3 | import com.rodrigodominguez.mixanimationsmotionlayout.circularcards.CreditCardModel
4 |
5 | data class CreditCardsHorizontalModel(
6 | val cardOne: CreditCardModel,
7 | val cardTwo: CreditCardModel,
8 | val cardThree: CreditCardModel,
9 | val cardFour: CreditCardModel,
10 | val cardFive: CreditCardModel
11 | )
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/horizontalcarousel/HorizontalCarouselActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.horizontalcarousel
2 |
3 | import android.graphics.Color
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import android.view.View
7 | import androidx.constraintlayout.helper.widget.Carousel
8 | import androidx.constraintlayout.motion.widget.MotionLayout
9 | import androidx.constraintlayout.motion.widget.TransitionAdapter
10 | import androidx.lifecycle.Observer
11 | import androidx.lifecycle.ViewModelProviders
12 | import androidx.lifecycle.lifecycleScope
13 | import com.google.android.material.card.MaterialCardView
14 | import com.rodrigodominguez.mixanimationsmotionlayout.R
15 | import com.rodrigodominguez.mixanimationsmotionlayout.circularcards.CreditCardsViewModel
16 | import kotlinx.android.synthetic.main.activity_circular_cards_demo.*
17 | import kotlinx.android.synthetic.main.activity_horizontal_carousel.*
18 | import kotlinx.coroutines.coroutineScope
19 | import kotlinx.coroutines.delay
20 | import kotlinx.coroutines.launch
21 | import java.util.*
22 | import kotlin.concurrent.schedule
23 |
24 | class HorizontalCarouselActivity : AppCompatActivity() {
25 | var colors = intArrayOf(
26 | Color.parseColor("#81d4fa"),
27 | Color.parseColor("#4fc3f7"),
28 | Color.parseColor("#29b6f6"),
29 | Color.parseColor("#03a9f4"),
30 | Color.parseColor("#039be5"),
31 | Color.parseColor("#0288d1"),
32 | Color.parseColor("#0277bd"),
33 | Color.parseColor("#01579b")
34 | )
35 | override fun onCreate(savedInstanceState: Bundle?) {
36 | super.onCreate(savedInstanceState)
37 | setContentView(R.layout.activity_horizontal_carousel)
38 | setupCarousel()
39 | }
40 |
41 | private fun setupCarousel() {
42 | val carousel = findViewById(R.id.carouselSnake) ?: return
43 | val numImages = colors.size
44 |
45 | carousel.setAdapter(object : Carousel.Adapter {
46 | override fun count(): Int {
47 | return numImages
48 | }
49 |
50 | override fun populate(view: View, index: Int) {
51 | if (view is MaterialCardView) {
52 | view.setBackgroundColor(colors[index])
53 | }
54 | }
55 |
56 | override fun onNewItem(index: Int) {
57 | }
58 | })
59 | }
60 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/modopay/ModoPaymentActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.modopay
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class ModoPaymentActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_modo_payment)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/motionwithar/MotionAndAugmentedRealityActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.motionwithar
2 |
3 | import android.os.Build
4 | import android.os.Bundle
5 | import android.view.MotionEvent
6 | import androidx.annotation.RequiresApi
7 | import androidx.appcompat.app.AlertDialog
8 | import androidx.appcompat.app.AppCompatActivity
9 | import com.google.ar.core.Anchor
10 | import com.google.ar.core.HitResult
11 | import com.google.ar.core.Plane
12 | import com.google.ar.sceneform.AnchorNode
13 | import com.google.ar.sceneform.math.Quaternion
14 | import com.google.ar.sceneform.math.Vector3
15 | import com.google.ar.sceneform.rendering.Renderable
16 | import com.google.ar.sceneform.rendering.ViewRenderable
17 | import com.google.ar.sceneform.ux.ArFragment
18 | import com.google.ar.sceneform.ux.TransformableNode
19 | import com.rodrigodominguez.mixanimationsmotionlayout.R
20 | import kotlinx.android.synthetic.main.activity_motion_and_augmented_reality.*
21 |
22 |
23 | class MotionAndAugmentedRealityActivity : AppCompatActivity() {
24 |
25 | lateinit var arFragment: ArFragment
26 |
27 | @RequiresApi(Build.VERSION_CODES.N)
28 | override fun onCreate(savedInstanceState: Bundle?) {
29 | super.onCreate(savedInstanceState)
30 | setContentView(R.layout.activity_motion_and_augmented_reality)
31 |
32 | arFragment = sceneformFragment as ArFragment
33 |
34 | arFragment.setOnTapArPlaneListener { hitResult: HitResult, plane: Plane, motionEvent: MotionEvent ->
35 | if (plane.type != Plane.Type.HORIZONTAL_UPWARD_FACING) {
36 | return@setOnTapArPlaneListener
37 | }
38 | val anchor = hitResult.createAnchor()
39 | placeObject(arFragment, anchor)
40 | }
41 | }
42 |
43 |
44 | @RequiresApi(Build.VERSION_CODES.N)
45 | private fun placeObject(fragment: ArFragment, anchor: Anchor) {
46 | ViewRenderable.builder()
47 | .setView(fragment.context, R.layout.activity_food_circle_tabs_ar)
48 | .build()
49 | .thenAccept {
50 | addControlsToScene(fragment, anchor, it)
51 | }
52 | .exceptionally { it ->
53 | val builder = AlertDialog.Builder(this)
54 | builder.setMessage(it.message).setTitle("Error")
55 | val dialog = builder.create()
56 | dialog.show()
57 | return@exceptionally null
58 | }
59 | }
60 |
61 | private fun addControlsToScene(fragment: ArFragment, anchor: Anchor, renderable: Renderable) {
62 | val anchorNode = AnchorNode(anchor)
63 | val node = TransformableNode(fragment.transformationSystem)
64 | node.localScale = Vector3(0.00001f, 0.00001f, 0.00001f)
65 | node.localRotation = Quaternion.axisAngle(Vector3(-1f, 0f, 0f), 90f)
66 | node.translationController.isEnabled = false
67 | node.renderable = renderable
68 | node.setParent(anchorNode)
69 | fragment.arSceneView.scene.addChild(anchorNode)
70 | }
71 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/pillcards/PillCardModel.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.pillcards
2 |
3 | import com.rodrigodominguez.mixanimationsmotionlayout.circularcards.CreditCardModel
4 |
5 | data class PillCardModel(
6 | val cardOne: CreditCardModel,
7 | val cardTwo: CreditCardModel,
8 | val cardThree: CreditCardModel,
9 | val cardFour: CreditCardModel
10 | )
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/pillcards/PillCardsActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.pillcards
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import androidx.constraintlayout.motion.widget.MotionLayout
6 | import androidx.lifecycle.Observer
7 | import androidx.lifecycle.ViewModelProviders
8 | import com.rodrigodominguez.mixanimationsmotionlayout.R
9 | import com.rodrigodominguez.mixanimationsmotionlayout.horizontalcarousel.CreditCardsHorizontalViewModel
10 | import kotlinx.android.synthetic.main.activity_horizontal_carousel.*
11 | import kotlinx.android.synthetic.main.activity_horizontal_carousel.motionHorizontalParent
12 | import kotlinx.android.synthetic.main.activity_pill_cards.*
13 |
14 | class PillCardsActivity : AppCompatActivity() {
15 | override fun onCreate(savedInstanceState: Bundle?) {
16 | super.onCreate(savedInstanceState)
17 | setContentView(R.layout.activity_pill_cards)
18 |
19 | val viewModel = ViewModelProviders
20 | .of(this)
21 | .get(PillCardsViewModel::class.java)
22 |
23 | viewModel
24 | .modelStream
25 | .observe(this, Observer {
26 | bindCard(it)
27 | })
28 |
29 | motionPillCards.setTransitionListener(object : MotionLayout.TransitionListener {
30 | override fun onTransitionTrigger(p0: MotionLayout?, p1: Int, p2: Boolean, p3: Float) {
31 | }
32 |
33 | override fun onTransitionStarted(p0: MotionLayout?, p1: Int, p2: Int) {
34 | }
35 |
36 | override fun onTransitionChange(p0: MotionLayout?, p1: Int, p2: Int, p3: Float) {
37 | }
38 |
39 | override fun onTransitionCompleted(p0: MotionLayout?, p1: Int) {
40 | p0?.post {
41 | when (p1) {
42 | R.id.end -> {
43 | p0.progress = 0f
44 | viewModel.swipeRight()
45 | }
46 | }
47 | }
48 |
49 | }
50 |
51 | })
52 | }
53 |
54 | private fun bindCard(cards: PillCardModel?) {
55 | cards?.let {
56 | pillCard1.setCardBackgroundColor(cards.cardOne.backgroundColor)
57 | pillCard2.setCardBackgroundColor(cards.cardTwo.backgroundColor)
58 | pillCard3.setCardBackgroundColor(cards.cardThree.backgroundColor)
59 | pillCard4.setCardBackgroundColor(cards.cardFour.backgroundColor)
60 | }
61 | }
62 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/pillcards/PillCardsViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.pillcards
2 |
3 | import android.graphics.Color
4 | import androidx.lifecycle.LiveData
5 | import androidx.lifecycle.ViewModel
6 | import androidx.lifecycle.MutableLiveData
7 | import com.rodrigodominguez.mixanimationsmotionlayout.circularcards.CreditCardModel
8 |
9 | class PillCardsViewModel : ViewModel() {
10 |
11 | private val stream = MutableLiveData()
12 |
13 | val modelStream: LiveData
14 | get() = stream
15 |
16 | private val data = listOf(
17 | CreditCardModel(backgroundColor = Color.parseColor("#607d8b")),
18 | CreditCardModel(backgroundColor = Color.parseColor("#d4e157")),
19 | CreditCardModel(backgroundColor = Color.parseColor("#9e9e9e")),
20 | CreditCardModel(backgroundColor = Color.parseColor("#e91e63")),
21 | CreditCardModel(backgroundColor = Color.parseColor("#795548")),
22 | CreditCardModel(backgroundColor = Color.parseColor("#039be5")),
23 | CreditCardModel(backgroundColor = Color.parseColor("#fbc02d")),
24 | CreditCardModel(backgroundColor = Color.parseColor("#303f9f")),
25 | CreditCardModel(backgroundColor = Color.parseColor("#dce775")),
26 | CreditCardModel(backgroundColor = Color.parseColor("#6a1b9a"))
27 | )
28 | private var currentIndex = 0
29 |
30 | private val cardOneLeft
31 | get() = data[currentIndex % data.size]
32 | private val cardTwoLeft
33 | get() = data[(currentIndex + 1) % data.size]
34 | private val cardThreeLeft
35 | get() = data[(currentIndex + 2) % data.size]
36 | private val cardFourLeft
37 | get() = data[(currentIndex + 3) % data.size]
38 |
39 |
40 | init {
41 | updateCards()
42 | }
43 |
44 | fun swipeRight() {
45 | currentIndex += 1
46 | updateCards()
47 | }
48 |
49 | fun swipeLeft() {
50 | if (currentIndex == 0) {
51 | currentIndex = data.size - 1
52 | } else {
53 | currentIndex -= 1
54 | }
55 | updateCards()
56 | }
57 |
58 | private fun updateCards() {
59 | stream.value = PillCardModel(
60 | cardOne = cardOneLeft,
61 | cardTwo = cardTwoLeft,
62 | cardThree = cardThreeLeft,
63 | cardFour = cardFourLeft)
64 | }
65 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/pivotrotation/FoodCircleTabsActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.pivotrotation
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class FoodCircleTabsActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_food_circle_tabs)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/rotationcard/RotationCardDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.rotationcard
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class RotationCardDemoActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_rotation_card_demo)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/rotationcard/RotationCardHomeActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.rotationcard
2 |
3 | import android.content.Intent
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import com.rodrigodominguez.mixanimationsmotionlayout.R
7 | import com.rodrigodominguez.mixanimationsmotionlayout.rotationcard.scenes.RotationCardScene1Activity
8 | import com.rodrigodominguez.mixanimationsmotionlayout.rotationcard.scenes.RotationCardScene2Activity
9 | import kotlinx.android.synthetic.main.activity_rotation_card_home.*
10 |
11 | class RotationCardHomeActivity : AppCompatActivity() {
12 | override fun onCreate(savedInstanceState: Bundle?) {
13 | super.onCreate(savedInstanceState)
14 | setContentView(R.layout.activity_rotation_card_home)
15 | demoRotationCard.setOnClickListener {
16 | startActivity(
17 | Intent(this, RotationCardDemoActivity::class.java)
18 | )
19 | }
20 | rotationCardScene1.setOnClickListener {
21 | startActivity(
22 | Intent(this, RotationCardScene1Activity::class.java)
23 | )
24 | }
25 | rotationCardScene2.setOnClickListener {
26 | startActivity(
27 | Intent(this, RotationCardScene2Activity::class.java)
28 | )
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/rotationcard/scenes/RotationCardScene1Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.rotationcard.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class RotationCardScene1Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_rotation_card_scene1)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/rotationcard/scenes/RotationCardScene2Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.rotationcard.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class RotationCardScene2Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_rotation_card_scene2)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/sampleskeycycle/KeyCycleSampleActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.sampleskeycycle
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class KeyCycleSampleActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_key_cycle_sample)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/sensor/CardSensorActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.sensor
2 |
3 | import android.content.Context
4 | import android.hardware.Sensor
5 | import android.hardware.SensorEvent
6 | import android.hardware.SensorEventListener
7 | import android.hardware.SensorManager
8 | import android.os.Bundle
9 | import android.util.Log
10 | import android.widget.Toast
11 | import androidx.appcompat.app.AppCompatActivity
12 | import com.rodrigodominguez.mixanimationsmotionlayout.R
13 | import kotlinx.android.synthetic.main.activity_test_sensores_android.*
14 | import kotlin.math.roundToInt
15 |
16 |
17 | class CardSensorActivity : AppCompatActivity(), SensorEventListener {
18 | private var sensorManager: SensorManager? = null
19 | private var gravitySensor: Sensor? = null
20 |
21 | override fun onCreate(savedInstanceState: Bundle?) {
22 | super.onCreate(savedInstanceState)
23 | setContentView(R.layout.activity_test_sensores_android)
24 |
25 | sensorManager = getSystemService(Context.SENSOR_SERVICE) as SensorManager
26 |
27 | sensorManager?.let { sensorManager ->
28 | gravitySensor = sensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY)
29 | }
30 | }
31 |
32 | override fun onResume() {
33 | super.onResume()
34 | gravitySensor?.also { gravity ->
35 | sensorManager?.registerListener(this, gravity, SensorManager.SENSOR_DELAY_GAME)
36 | }
37 | }
38 |
39 | //unregister
40 | override fun onPause() {
41 | super.onPause()
42 | sensorManager?.unregisterListener(this)
43 | }
44 |
45 | override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) {
46 |
47 | }
48 |
49 | override fun onSensorChanged(event: SensorEvent?) {
50 | event?.let { sensorEvent ->
51 | val ejeZ = (sensorEvent.values[2] * 10) / 100
52 | if (ejeZ > 0 && ejeZ < 100) {
53 | if (ejeZ > rotationCardMotionLayout.progress + 0.04) {
54 | rotationCardMotionLayout.progress = ejeZ
55 | }
56 |
57 | if (ejeZ < rotationCardMotionLayout.progress - 0.04) {
58 | rotationCardMotionLayout.progress = ejeZ
59 | }
60 | }
61 | }
62 | }
63 |
64 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/starbucks/ItemsStarbucksAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.starbucks
2 |
3 | import android.view.LayoutInflater
4 | import android.view.View
5 | import android.view.ViewGroup
6 | import androidx.recyclerview.widget.RecyclerView
7 | import com.rodrigodominguez.mixanimationsmotionlayout.R
8 | import com.rodrigodominguez.mixanimationsmotionlayout.starbucks.data.Product
9 | import kotlinx.android.synthetic.main.item_product_starbucks.view.*
10 |
11 | class ItemsStarbucksAdapter(private val list: List) : RecyclerView.Adapter() {
12 |
13 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) : ViewHolder = ViewHolder(
14 | LayoutInflater.from(parent.context).inflate(R.layout.item_product_starbucks, parent, false))
15 |
16 | override fun getItemCount(): Int = list.size
17 |
18 | override fun onBindViewHolder(holder: ItemsStarbucksAdapter.ViewHolder, position: Int) = holder.bind(list[position])
19 |
20 |
21 | class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
22 | fun bind(item: Product) = with(itemView) {
23 | image.setImageDrawable(context.getDrawable(item.resource))
24 | titleProduct.text = item.title
25 | priceProduct.text = """${"$ "}${item.price}"""
26 | descriptionProduct.text = item.description
27 | count.text = """x ${item.count}"""
28 | }
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/starbucks/data/Product.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.starbucks.data
2 |
3 | import androidx.annotation.DrawableRes
4 |
5 | data class Product(
6 | val title: String,
7 | val description: String,
8 | @DrawableRes
9 | val resource: Int,
10 | val price: Float,
11 | val count: Int
12 | )
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/storiesinstagram/InstagramStoryDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import androidx.constraintlayout.motion.widget.MotionLayout
6 | import androidx.lifecycle.Observer
7 | import androidx.lifecycle.ViewModelProviders
8 | import com.rodrigodominguez.mixanimationsmotionlayout.R
9 | import kotlinx.android.synthetic.main.activity_instagram_story_demo.*
10 | import kotlinx.android.synthetic.main.layout_story.*
11 | import kotlinx.android.synthetic.main.layout_story_two.*
12 |
13 | class InstagramStoryDemoActivity : AppCompatActivity() {
14 |
15 | override fun onCreate(savedInstanceState: Bundle?) {
16 | super.onCreate(savedInstanceState)
17 | setContentView(R.layout.activity_instagram_story_demo)
18 |
19 | val viewModel = ViewModelProviders
20 | .of(this)
21 | .get(StoriesViewModel::class.java)
22 |
23 | viewModel
24 | .modelStream
25 | .observe(this, Observer {
26 | bindCard(it)
27 | })
28 |
29 | storyMotionLayout.setTransitionListener(object : MotionLayout.TransitionListener {
30 | override fun onTransitionTrigger(p0: MotionLayout?, p1: Int, p2: Boolean, p3: Float) {
31 | }
32 |
33 | override fun onTransitionStarted(p0: MotionLayout?, p1: Int, p2: Int) {
34 | }
35 |
36 | override fun onTransitionChange(p0: MotionLayout?, p1: Int, p2: Int, p3: Float) {
37 | storyMotionDetail.progress = p3
38 | storyMotionDetailTwo.progress = 1 - p3
39 | }
40 |
41 | override fun onTransitionCompleted(p0: MotionLayout?, currentId: Int) {
42 | p0?.post {
43 | when (currentId) {
44 | R.id.end -> {
45 | storyMotionDetail.progress = 0f
46 | storyMotionLayout.progress = 0f
47 | viewModel.swipe()
48 | }
49 | }
50 | }
51 | }
52 |
53 | })
54 |
55 | }
56 |
57 | private fun bindCard(it: StoryModel) {
58 | storyOne.setCardBackgroundColor(it.cardTop.backgroundColor)
59 | storyTwo.setCardBackgroundColor(it.cardBottom.backgroundColor)
60 | }
61 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/storiesinstagram/InstagramStoryHomeActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram
2 |
3 | import android.content.Intent
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import com.rodrigodominguez.mixanimationsmotionlayout.R
7 | import com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram.scenes.InstagramStoryScene1Activity
8 | import com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram.scenes.InstagramStoryScene2Activity
9 | import com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram.scenes.InstagramStoryScene3Activity
10 | import com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram.scenes.InstagramStoryScene4Activity
11 | import kotlinx.android.synthetic.main.activity_instagram_story_home.*
12 |
13 | class InstagramStoryHomeActivity : AppCompatActivity() {
14 | override fun onCreate(savedInstanceState: Bundle?) {
15 | super.onCreate(savedInstanceState)
16 | setContentView(R.layout.activity_instagram_story_home)
17 |
18 | demoInstagram.setOnClickListener {
19 | startActivity(
20 | Intent(this, InstagramStoryDemoActivity::class.java)
21 | )
22 | }
23 |
24 | instagramStoryScene1.setOnClickListener {
25 | startActivity(
26 | Intent(this, InstagramStoryScene1Activity::class.java)
27 | )
28 | }
29 |
30 | instagramStoryScene2.setOnClickListener {
31 | startActivity(
32 | Intent(this, InstagramStoryScene2Activity::class.java)
33 | )
34 | }
35 |
36 | instagramStoryScene3.setOnClickListener {
37 | startActivity(
38 | Intent(this, InstagramStoryScene3Activity::class.java)
39 | )
40 | }
41 |
42 | instagramStoryScene4.setOnClickListener {
43 | startActivity(
44 | Intent(this, InstagramStoryScene4Activity::class.java)
45 | )
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/storiesinstagram/StoriesViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram
2 |
3 | import android.graphics.Color
4 | import androidx.lifecycle.LiveData
5 | import androidx.lifecycle.ViewModel
6 | import androidx.lifecycle.MutableLiveData
7 |
8 | class StoriesViewModel: ViewModel() {
9 |
10 | private val stream = MutableLiveData()
11 |
12 | val modelStream: LiveData
13 | get() = stream
14 |
15 | private val data = listOf(
16 | Story(
17 | backgroundColor = Color.parseColor("#4b636e")
18 | ),
19 | Story(
20 | backgroundColor = Color.parseColor("#c56200")
21 | ),
22 | Story(
23 | backgroundColor = Color.parseColor("#c79400")
24 | ),
25 | Story(
26 | backgroundColor = Color.parseColor("#c7b800")
27 | ),
28 | Story(
29 | backgroundColor = Color.parseColor("#90cc00")
30 | ),
31 | Story(
32 | backgroundColor = Color.parseColor("#32cb00")
33 | ),
34 | Story(
35 | backgroundColor = Color.parseColor("#00b248")
36 | ),
37 | Story(
38 | backgroundColor = Color.parseColor("#00b686")
39 | ),
40 | Story(
41 | backgroundColor = Color.parseColor("#00b2cc")
42 | ),
43 | Story(
44 | backgroundColor = Color.parseColor("#0081cb")
45 | ),
46 | Story(
47 | backgroundColor = Color.parseColor("#004ecb")
48 | ),
49 | Story(
50 | backgroundColor = Color.parseColor("#0031ca")
51 | ),
52 | Story(
53 | backgroundColor = Color.parseColor("#0100ca")
54 | )
55 | )
56 | private var currentIndex = 0
57 |
58 | private val topCard
59 | get() = data[currentIndex % data.size]
60 | private val bottomCard
61 | get() = data[(currentIndex + 1) % data.size]
62 |
63 | init {
64 | updateCards()
65 | }
66 |
67 | fun swipe() {
68 | currentIndex += 1
69 | updateCards()
70 | }
71 |
72 | private fun updateCards() {
73 | stream.value = StoryModel(
74 | cardTop = topCard,
75 | cardBottom = bottomCard
76 | )
77 | }
78 |
79 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/storiesinstagram/Story.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram
2 |
3 | import androidx.annotation.ColorInt
4 |
5 | data class Story(
6 | @ColorInt val backgroundColor: Int
7 | )
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/storiesinstagram/StoryModel.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram
2 |
3 | data class StoryModel(
4 | val cardTop: Story,
5 | val cardBottom: Story
6 | )
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/storiesinstagram/scenes/InstagramStoryScene1Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class InstagramStoryScene1Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_instagram_story_scene1)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/storiesinstagram/scenes/InstagramStoryScene2Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class InstagramStoryScene2Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_instagram_story_scene2)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/storiesinstagram/scenes/InstagramStoryScene3Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class InstagramStoryScene3Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_instagram_story_scene3)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/storiesinstagram/scenes/InstagramStoryScene4Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.storiesinstagram.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class InstagramStoryScene4Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_instagram_story_scene4)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/telegramheaderdemo/TelegramHeaderDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.telegramheaderdemo
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class TelegramHeaderDemoActivity : AppCompatActivity() {
8 |
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | setContentView(R.layout.activity_telegram_header_demo)
12 |
13 | }
14 |
15 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/testbutton/TestButtonActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.testbutton
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class TestButtonActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_key_position_delta)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/verticalsnake/VerticalSnakeActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.verticalsnake
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class VerticalSnakeActivity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_vertical_snake)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/verticalstackcards/Card.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards
2 |
3 | import androidx.annotation.ColorInt
4 |
5 | data class Card(
6 | @ColorInt val backgroundColor: Int
7 | )
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/verticalstackcards/VerticalCardModel.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards
2 |
3 | data class VerticalCardModel(
4 | val detailCard: Card,
5 | val cardTop: Card,
6 | val cardMiddle: Card,
7 | val cardBottom: Card,
8 | val cardEnd: Card,
9 | val cardTransparent: Card
10 | )
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/verticalstackcards/VerticalStackCardViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards
2 |
3 | import android.graphics.Color
4 | import androidx.lifecycle.LiveData
5 | import androidx.lifecycle.ViewModel
6 | import androidx.lifecycle.MutableLiveData
7 |
8 | class VerticalStackCardViewModel: ViewModel() {
9 |
10 | private val stream = MutableLiveData()
11 |
12 | val modelStream: LiveData
13 | get() = stream
14 |
15 | private val data = listOf(
16 | Card(
17 | backgroundColor = Color.parseColor("#c50e29")
18 | ),
19 | Card(
20 | backgroundColor = Color.parseColor("#c60055")
21 | ),
22 | Card(
23 | backgroundColor = Color.parseColor("#aa00c7")
24 | ),
25 | Card(
26 | backgroundColor = Color.parseColor("#3f1dcb")
27 | ),
28 | Card(
29 | backgroundColor = Color.parseColor("#0043ca")
30 | ),
31 | Card(
32 | backgroundColor = Color.parseColor("#005ecb")
33 | ),
34 | Card(
35 | backgroundColor = Color.parseColor("#0094cc")
36 | ),
37 | Card(
38 | backgroundColor = Color.parseColor("#00cbcc")
39 | ),
40 | Card(
41 | backgroundColor = Color.parseColor("#14cba8")
42 | ),
43 | Card(
44 | backgroundColor = Color.parseColor("#2bbd7e")
45 | ),
46 | Card(
47 | backgroundColor = Color.parseColor("#7ecb20")
48 | ),
49 | Card(
50 | backgroundColor = Color.parseColor("#b8cc00")
51 | ),
52 | Card(
53 | backgroundColor = Color.parseColor("#c7cc00")
54 | ),
55 | Card(
56 | backgroundColor = Color.parseColor("#c8a600")
57 | ),
58 | Card(
59 | backgroundColor = Color.parseColor("#c77c02")
60 | ),
61 | Card(
62 | backgroundColor = Color.parseColor("#c53d13")
63 | )
64 | )
65 | private var currentIndex = 0
66 |
67 | private val detailCard
68 | get() = data[currentIndex % data.size]
69 | private val cardTop
70 | get() = data[(currentIndex + 1) % data.size]
71 | private val cardMiddle
72 | get() = data[(currentIndex + 2) % data.size]
73 | private val cardBottom
74 | get() = data[(currentIndex + 3) % data.size]
75 | private val cardEnd
76 | get() = data[(currentIndex + 4) % data.size]
77 | private val cardTransparent
78 | get() = data[(currentIndex + 5) % data.size]
79 |
80 | init {
81 | updateCards()
82 | }
83 |
84 | fun swipe() {
85 | currentIndex += 1
86 | updateCards()
87 | }
88 |
89 | private fun updateCards() {
90 | stream.value = VerticalCardModel(
91 | detailCard = detailCard,
92 | cardTop = cardTop,
93 | cardMiddle = cardMiddle,
94 | cardBottom = cardBottom,
95 | cardEnd = cardEnd,
96 | cardTransparent = cardTransparent
97 | )
98 | }
99 |
100 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/verticalstackcards/VerticalStackCardsDemoActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import androidx.constraintlayout.motion.widget.MotionLayout
6 | import androidx.constraintlayout.motion.widget.TransitionAdapter
7 | import androidx.lifecycle.Observer
8 | import androidx.lifecycle.ViewModelProviders
9 | import com.rodrigodominguez.mixanimationsmotionlayout.R
10 | import kotlinx.android.synthetic.main.activity_vertical_stack_cards_demo.*
11 |
12 | class VerticalStackCardsDemoActivity : AppCompatActivity() {
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_vertical_stack_cards_demo)
16 |
17 | val viewModel = ViewModelProviders
18 | .of(this)
19 | .get(VerticalStackCardViewModel::class.java)
20 |
21 | viewModel
22 | .modelStream
23 | .observe(this, Observer {
24 | bindCard(it)
25 | })
26 |
27 | verticalMotionLayout.setTransitionListener(object : TransitionAdapter() {
28 | override fun onTransitionCompleted(motionLayout: MotionLayout?, currentId: Int) {
29 | motionLayout?.post {
30 | when (currentId) {
31 | R.id.end -> {
32 | verticalMotionLayout.progress = 0f
33 | verticalMotionLayout.progress = 0f
34 | viewModel.swipe()
35 | }
36 | }
37 | }
38 | }
39 | })
40 | }
41 |
42 | private fun bindCard(it: VerticalCardModel) {
43 | cardDetail.setCardBackgroundColor(it.detailCard.backgroundColor)
44 | cardTop.setCardBackgroundColor(it.cardTop.backgroundColor)
45 | cardMiddle.setCardBackgroundColor(it.cardMiddle.backgroundColor)
46 | cardBottom.setCardBackgroundColor(it.cardBottom.backgroundColor)
47 | cardEnd.setCardBackgroundColor(it.cardEnd.backgroundColor)
48 | cardTransparent.setCardBackgroundColor(it.cardTransparent.backgroundColor)
49 | }
50 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/verticalstackcards/VerticalStackCardsHomeActivity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards
2 |
3 | import android.content.Intent
4 | import androidx.appcompat.app.AppCompatActivity
5 | import android.os.Bundle
6 | import com.rodrigodominguez.mixanimationsmotionlayout.R
7 | import com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards.scenes.VerticalStackCardsScene1Activity
8 | import com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards.scenes.VerticalStackCardsScene2Activity
9 | import com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards.scenes.VerticalStackCardsScene3Activity
10 | import kotlinx.android.synthetic.main.activity_vertical_stack_cards_home.*
11 |
12 | class VerticalStackCardsHomeActivity : AppCompatActivity() {
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_vertical_stack_cards_home)
16 |
17 | demo.setOnClickListener {
18 | startActivity(
19 | Intent(this, VerticalStackCardsDemoActivity::class.java)
20 | )
21 | }
22 |
23 | verticalStackScene1.setOnClickListener {
24 | startActivity(
25 | Intent(this, VerticalStackCardsScene1Activity::class.java)
26 | )
27 | }
28 |
29 | verticalStackScene2.setOnClickListener {
30 | startActivity(
31 | Intent(this, VerticalStackCardsScene2Activity::class.java)
32 | )
33 | }
34 |
35 | verticalStackScene3.setOnClickListener {
36 | startActivity(
37 | Intent(this, VerticalStackCardsScene3Activity::class.java)
38 | )
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/verticalstackcards/scenes/VerticalStackCardsScene1Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class VerticalStackCardsScene1Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_vertical_stack_cards_scene1)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/verticalstackcards/scenes/VerticalStackCardsScene2Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class VerticalStackCardsScene2Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_vertical_stack_cards_scene2)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/rodrigodominguez/mixanimationsmotionlayout/verticalstackcards/scenes/VerticalStackCardsScene3Activity.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout.verticalstackcards.scenes
2 |
3 | import androidx.appcompat.app.AppCompatActivity
4 | import android.os.Bundle
5 | import com.rodrigodominguez.mixanimationsmotionlayout.R
6 |
7 | class VerticalStackCardsScene3Activity : AppCompatActivity() {
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_vertical_stack_cards_scene3)
11 | }
12 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/arrow_back_24px.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
10 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/camera_alt_24px.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/chip.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/drawable/chip.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable/coffee_takeaway_outline.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/contactless_24px_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/green_starbucks.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/drawable/green_starbucks.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic__01_hotdog.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic__02_yogurt.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
18 |
21 |
24 |
27 |
30 |
33 |
36 |
39 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_upward_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_check_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_visa_inc_logo_black.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mocha.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/drawable/mocha.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/more_vert_24px.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
10 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/send_24px.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_circle_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
9 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_circle_blue_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
9 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_circle_pyg_violet.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
9 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_circle_pyg_violet_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
9 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_circular.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_modo_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_modo_background_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_sheet_starbucks.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_size_cup.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_size_cup_selected.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/font/rubik_black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/font/rubik_black.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/rubik_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/font/rubik_bold.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/rubik_light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/font/rubik_light.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/rubik_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/font/rubik_medium.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/rubik_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/font/rubik_regular.ttf
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_circular_cards_scene1.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_circular_cards_scene2.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
29 |
30 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_circular_cards_scene3.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
29 |
30 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_circular_cards_scene4.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
29 |
30 |
40 |
41 |
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_circular_cards_scene5.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
17 |
18 |
28 |
29 |
39 |
40 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_custom_attribute_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_demo_constraint_set.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
28 |
29 |
38 |
39 |
48 |
49 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_flow_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
26 |
27 |
35 |
36 |
44 |
45 |
53 |
54 |
62 |
63 |
71 |
72 |
77 |
78 |
83 |
84 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_instagram_story_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
24 |
25 |
27 |
28 |
29 |
39 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_instagram_story_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
33 |
34 |
45 |
46 |
57 |
58 |
69 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_instagram_story_scene1.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_instagram_story_scene2.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_instagram_story_scene3.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
22 |
23 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_instagram_story_scene4.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
22 |
23 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_key_cycle_sample.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
28 |
29 |
30 |
38 |
39 |
40 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_key_position_delta.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_key_position_parent.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_key_position_path.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_layout_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_motion_and_augmented_reality.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_motion_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
22 |
23 |
24 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_pill_cards.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
23 |
24 |
35 |
36 |
37 |
48 |
49 |
60 |
61 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_position_key_example.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
33 |
34 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_property_set_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_rotation_card_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
33 |
34 |
45 |
46 |
56 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_test_sensores_android.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_vertical_stack_cards_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
33 |
34 |
45 |
46 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_vertical_stack_cards_scene1.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_vertical_stack_cards_scene2.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
21 |
22 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_vertical_stack_cards_scene3.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
21 |
22 |
33 |
34 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/credit_card_reverse.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
21 |
22 |
30 |
31 |
42 |
43 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_product_starbucks.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
31 |
32 |
46 |
47 |
61 |
62 |
74 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_story.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
22 |
23 |
39 |
40 |
41 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_story_two.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
22 |
23 |
39 |
40 |
41 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_products_motion_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
22 |
23 |
33 |
34 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 | #00704A
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimen.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 12dp
5 | 8dp
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | MixAnimationsMotionLayout
3 | PillCardsActivity
4 |
5 | First Fragment
6 | Second Fragment
7 | Next
8 | Previous
9 |
10 | Hello first fragment
11 | Hello second fragment. Arg: %1$s
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_circular_cards_scene1.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
38 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_circular_cards_scene2.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
24 |
27 |
28 |
29 |
30 |
36 |
39 |
40 |
41 |
42 |
43 |
44 |
50 |
53 |
54 |
55 |
56 |
62 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_circular_cards_scene3.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
31 |
34 |
35 |
36 |
37 |
43 |
46 |
47 |
48 |
49 |
50 |
51 |
57 |
60 |
61 |
62 |
63 |
69 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_custom_attribute_demo_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_instagram_story_demo_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
15 |
21 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
38 |
41 |
42 |
43 |
44 |
48 |
49 |
52 |
53 |
54 |
55 |
56 |
57 |
61 |
62 |
65 |
66 |
67 |
68 |
73 |
74 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_instagram_story_scene1.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
15 |
16 |
17 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
34 |
35 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_instagram_story_scene2.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
15 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
42 |
43 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_instagram_story_scene3.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
15 |
20 |
21 |
26 |
27 |
28 |
29 |
30 |
31 |
36 |
39 |
40 |
41 |
42 |
46 |
47 |
50 |
51 |
52 |
53 |
54 |
55 |
59 |
60 |
63 |
64 |
65 |
66 |
71 |
72 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_instagram_story_scene4.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
13 |
14 |
15 |
21 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
38 |
41 |
42 |
43 |
44 |
48 |
49 |
52 |
53 |
54 |
55 |
56 |
57 |
61 |
62 |
65 |
66 |
67 |
68 |
73 |
74 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_key_cycle_sample_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_key_position_delta_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
30 |
31 |
32 |
33 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_key_position_parent_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
30 |
31 |
32 |
33 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_key_position_path_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
30 |
31 |
32 |
33 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_layout_demo_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_motion_demo_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
11 |
12 |
13 |
14 |
21 |
22 |
23 |
24 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
46 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_property_set_demo_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_rotation_card_scene1_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
38 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_test_sensores_android_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
11 |
12 |
13 |
20 |
21 |
22 |
23 |
24 |
25 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_vertical_stack_cards_scene1.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/activity_vertical_stack_cards_scene2.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
30 |
31 |
32 |
33 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
55 |
56 |
57 |
58 |
59 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/list_products_motion_layout_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/test/java/com/rodrigodominguez/mixanimationsmotionlayout/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.rodrigodominguez.mixanimationsmotionlayout
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | ext.kotlin_version = '1.4.0'
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:4.2.0-beta06'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 |
23 | }
24 | }
25 |
26 | ext {
27 | appCompat = '1.2.0'
28 | constraintLayout = '2.1.0-beta01'
29 | coreKtx = '1.5.0-alpha02'
30 | materialComponents = '1.4.0-alpha02'
31 | }
32 |
33 | task clean(type: Delete) {
34 | delete rootProject.buildDir
35 | }
36 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | # Kotlin code style for this project: "official" or "obsolete":
21 | kotlin.code.style=official
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rodrigomartind/MixAnimationsMotionLayout/17e3d8ad36a3b9806c828bd03cc71eb37af789dc/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Aug 21 11:12:23 ART 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-bin.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name = "MixAnimationsMotionLayout"
--------------------------------------------------------------------------------