├── .DS_Store ├── .bash_profile ├── .gradle ├── 5.1.1 │ ├── executionHistory │ │ ├── executionHistory.bin │ │ └── executionHistory.lock │ ├── fileChanges │ │ └── last-build.bin │ ├── fileContent │ │ └── fileContent.lock │ ├── fileHashes │ │ ├── fileHashes.bin │ │ ├── fileHashes.lock │ │ └── resourceHashesCache.bin │ ├── gc.properties │ └── javaCompile │ │ ├── classAnalysis.bin │ │ ├── jarAnalysis.bin │ │ ├── javaCompile.lock │ │ └── taskHistory.bin ├── buildOutputCleanup │ ├── buildOutputCleanup.lock │ ├── cache.properties │ └── outputFiles.bin └── vcs-1 │ └── gc.properties ├── .idea ├── assetWizardSettings.xml ├── caches │ └── build_file_checksums.ser ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── compiler.xml ├── dictionaries │ └── moos.xml ├── encodings.xml ├── gradle.xml ├── jarRepositories.xml ├── libraries │ ├── Gradle__androidx_activity_activity_1_0_0_aar.xml │ ├── Gradle__androidx_annotation_annotation_1_1_0.xml │ ├── Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml │ ├── Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml │ ├── Gradle__androidx_arch_core_core_common_2_1_0.xml │ ├── Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml │ ├── Gradle__androidx_cardview_cardview_1_0_0_aar.xml │ ├── Gradle__androidx_collection_collection_1_1_0.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_2_0_0_beta8_aar.xml │ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_2_0_0_beta8.xml │ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml │ ├── Gradle__androidx_core_core_1_2_0_aar.xml │ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml │ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml │ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml │ ├── Gradle__androidx_fragment_fragment_1_1_0_aar.xml │ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_common_2_1_0.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml │ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml │ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml │ ├── Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml │ ├── Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml │ ├── Gradle__androidx_transition_transition_1_2_0_aar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml │ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml │ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml │ ├── Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml │ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml │ ├── Gradle__com_airbnb_android_lottie_2_5_1_aar.xml │ ├── Gradle__com_google_android_material_material_1_1_0_aar.xml │ ├── Gradle__de_hdodenhof_circleimageview_3_0_0_aar.xml │ ├── Gradle__junit_junit_4_12.xml │ ├── Gradle__org_hamcrest_hamcrest_core_1_3.xml │ ├── Gradle__org_jetbrains_annotations_13_0.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_21.xml │ ├── Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_21.xml │ └── Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_21.xml ├── misc.xml ├── modules.xml ├── modules │ ├── MotionLayoutSamples.iml │ └── app │ │ └── MotionLayoutSamples.app.iml ├── runConfigurations.xml ├── vcs.xml └── workspace.xml ├── LICENSE ├── MotionLayoutSamples.zip ├── README.md ├── app ├── .DS_Store ├── .gitignore ├── build.gradle ├── proguard-rules.pro ├── sampledata │ ├── descriptions │ ├── sample.json │ ├── titles │ └── users └── src │ ├── .DS_Store │ ├── androidTest │ └── java │ │ └── com │ │ └── moos │ │ └── constraint │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── .DS_Store │ ├── AndroidManifest.xml │ ├── assets │ │ ├── bear.json │ │ └── tree_growing.json │ ├── ic_launcher-playstore.png │ ├── java │ │ └── com │ │ │ └── moos │ │ │ └── constraint │ │ │ ├── DetailActivity.kt │ │ │ ├── MainActivity.kt │ │ │ ├── MotionListActivity.kt │ │ │ ├── adapter │ │ │ ├── EntranceListAdapter.kt │ │ │ └── MotionListAdapter.kt │ │ │ ├── practice │ │ │ ├── AppBarMotionActivity.kt │ │ │ ├── DrawerMotionActivity.kt │ │ │ ├── LottieMotionActivity.kt │ │ │ ├── MotionSampleActivity.kt │ │ │ ├── MultiBallActivity.kt │ │ │ └── UserGuideActivity.kt │ │ │ └── widget │ │ │ ├── DrawerContentLayout.kt │ │ │ ├── MotionToolBar.kt │ │ │ ├── PageFragment.kt │ │ │ └── ViewPagerHeader.kt │ └── res │ │ ├── .DS_Store │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable-xhdpi │ │ ├── ic_user_lady1.png │ │ ├── ic_user_lady2.png │ │ ├── ic_user_man1.png │ │ └── ic_user_man2.png │ │ ├── drawable │ │ ├── card_shape.xml │ │ ├── guide_btn_selector.xml │ │ ├── ic_announcement.xml │ │ ├── ic_basketball.png │ │ ├── ic_browser.xml │ │ ├── ic_chat.xml │ │ ├── ic_idea.xml │ │ ├── ic_launcher_background.xml │ │ ├── ic_pie_chart.xml │ │ ├── ic_plus.png │ │ ├── ic_presentation.xml │ │ ├── ic_savings.xml │ │ ├── ic_sun.png │ │ ├── ic_user.xml │ │ ├── ic_wallet.xml │ │ ├── indicator_selected_shape.xml │ │ ├── indicator_shape.xml │ │ ├── moosphon_logo.jpeg │ │ ├── oval_seekbar_thumb.xml │ │ ├── progress_background.xml │ │ ├── quarter_circle_shape.xml │ │ ├── shanghai_night.png │ │ ├── timeory_logo.png │ │ ├── tree_scene.png │ │ └── user_other.jpg │ │ ├── layout │ │ ├── activity_detail.xml │ │ ├── activity_main.xml │ │ ├── activity_motion_list.xml │ │ ├── activity_motion_sample.xml │ │ ├── activity_motion_with_app_bar.xml │ │ ├── activity_motion_with_drawer.xml │ │ ├── activity_motion_with_lottie.xml │ │ ├── activity_multi_ball_layout.xml │ │ ├── card_item_layout.xml │ │ ├── entrance_item_layout.xml │ │ ├── header_layout.xml │ │ ├── holder_layout.xml │ │ ├── motion_list_rv_item.xml │ │ ├── sample_step1_layout.xml │ │ ├── sample_step2_layout.xml │ │ ├── sample_step3_layout.xml │ │ ├── sample_step4_layout.xml │ │ ├── sample_step5_layout.xml │ │ ├── scene_key_cycle_sample.xml │ │ ├── scene_loading_layout.xml │ │ ├── scene_search_anim.xml │ │ ├── scene_simple_app_bar_layout.xml │ │ ├── scene_trigger_sample.xml │ │ ├── scene_user_guide_layout.xml │ │ └── show_in_layout.xml │ │ ├── menu │ │ └── main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── android_icon_blue.png │ │ ├── android_icon_orange.png │ │ ├── android_icon_purple.png │ │ ├── cat.png │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── raw │ │ ├── delivery_latest.json │ │ ├── empty_emoj.json │ │ ├── face.json │ │ ├── shopping_intro.json │ │ └── tree_growing.json │ │ ├── values-en │ │ └── strings.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── ic_launcher_background.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ ├── motion_balls.xml │ │ ├── motion_drawer_content.xml │ │ ├── motion_drawer_menu.xml │ │ ├── motion_in_app_bar.xml │ │ ├── motion_list_rv_item_scene.xml │ │ ├── motion_loading.xml │ │ ├── motion_scene_fab.xml │ │ ├── motion_scene_key_cycle.xml │ │ ├── motion_scene_search.xml │ │ ├── motion_scene_simple_appbar.xml │ │ ├── motion_scene_user_guide.xml │ │ ├── motion_with_view_pager.xml │ │ ├── step1.xml │ │ ├── step2.xml │ │ ├── step3.xml │ │ ├── step4.xml │ │ └── step5.xml │ └── test │ └── java │ └── com │ └── moos │ └── constraint │ └── ExampleUnitTest.kt ├── arts ├── .DS_Store ├── header_bg.png ├── logo.png ├── preview_appbar.gif ├── preview_balls_sport.gif ├── preview_keycycle.gif ├── preview_lottie.gif ├── preview_multi_state.gif └── preview_recyclerview.gif ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── local.properties └── settings.gradle /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.DS_Store -------------------------------------------------------------------------------- /.bash_profile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.bash_profile -------------------------------------------------------------------------------- /.gradle/5.1.1/executionHistory/executionHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/executionHistory/executionHistory.bin -------------------------------------------------------------------------------- /.gradle/5.1.1/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /.gradle/5.1.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/5.1.1/fileContent/fileContent.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/fileContent/fileContent.lock -------------------------------------------------------------------------------- /.gradle/5.1.1/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /.gradle/5.1.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /.gradle/5.1.1/fileHashes/resourceHashesCache.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/fileHashes/resourceHashesCache.bin -------------------------------------------------------------------------------- /.gradle/5.1.1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/gc.properties -------------------------------------------------------------------------------- /.gradle/5.1.1/javaCompile/classAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/javaCompile/classAnalysis.bin -------------------------------------------------------------------------------- /.gradle/5.1.1/javaCompile/jarAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/javaCompile/jarAnalysis.bin -------------------------------------------------------------------------------- /.gradle/5.1.1/javaCompile/javaCompile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/javaCompile/javaCompile.lock -------------------------------------------------------------------------------- /.gradle/5.1.1/javaCompile/taskHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/5.1.1/javaCompile/taskHistory.bin -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Sat Aug 10 10:39:23 CST 2019 2 | gradle.version=5.1.1 3 | -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.gradle/vcs-1/gc.properties -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | xmlns:android 17 | 18 | ^$ 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | xmlns:.* 28 | 29 | ^$ 30 | 31 | 32 | BY_NAME 33 | 34 |
35 |
36 | 37 | 38 | 39 | .*:id 40 | 41 | http://schemas.android.com/apk/res/android 42 | 43 | 44 | 45 |
46 |
47 | 48 | 49 | 50 | .*:name 51 | 52 | http://schemas.android.com/apk/res/android 53 | 54 | 55 | 56 |
57 |
58 | 59 | 60 | 61 | name 62 | 63 | ^$ 64 | 65 | 66 | 67 |
68 |
69 | 70 | 71 | 72 | style 73 | 74 | ^$ 75 | 76 | 77 | 78 |
79 |
80 | 81 | 82 | 83 | .* 84 | 85 | ^$ 86 | 87 | 88 | BY_NAME 89 | 90 |
91 |
92 | 93 | 94 | 95 | .* 96 | 97 | http://schemas.android.com/apk/res/android 98 | 99 | 100 | ANDROID_ATTRIBUTE_ORDER 101 | 102 |
103 |
104 | 105 | 106 | 107 | .* 108 | 109 | .* 110 | 111 | 112 | BY_NAME 113 | 114 |
115 |
116 |
117 |
118 | 119 | 121 |
122 |
-------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/dictionaries/moos.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_2_0_0_beta8_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_2_0_0_beta8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_core_core_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_airbnb_android_lottie_2_5_1_aar.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 | 26 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__com_google_android_material_material_1_1_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__de_hdodenhof_circleimageview_3_0_0_aar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__junit_junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_21.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_21.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_21.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Android 12 | 13 | 14 | CorrectnessLintAndroid 15 | 16 | 17 | Java 18 | 19 | 20 | LintAndroid 21 | 22 | 23 | Probable bugsJava 24 | 25 | 26 | RELAX NG 27 | 28 | 29 | 30 | 31 | Android 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules/MotionLayoutSamples.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 AFeng 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MotionLayoutSamples.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/MotionLayoutSamples.zip -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MotionLayoutSamples 2 | ![header_bg](./arts/header_bg.png) 3 | 4 | This project contains android ConstraintLayout2.0 usages and MotionLayout usage, includes code practicing about animation as well. 5 | 6 | > 主要用来介绍一些关于 ***`ConstraintLayout`***、***`MotionLayout`*** 的用法,还包含 MotionLayout 的实战训练。 7 | 8 | ## My Articles 9 | 10 | - [MotionLayout: 打开动画新世界大门 (part I)](https://juejin.im/post/6844903918598635534) 11 | - [MotionLayout: 打开动画新世界大门 (part II)](https://juejin.im/post/6860316642887663624) 12 | 13 | - MotionLayout: 打开动画新世界大门 (part III) 14 | 15 | ## Effect Preview 16 | 17 | | :dark_sunglasses: | :deciduous_tree: | :green_salad: | 18 | | :----------------------------------------------------: | :----------------------------------------------------: | :------------------------------------------------------: | 19 | | ![preview_balls_sport](./arts/preview_balls_sport.gif) | ![preview_appbar](./arts/preview_appbar.gif) | ![preview_lottie](./arts/preview_lottie.gif) | 20 | | ![preview_keycycle](./arts/preview_keycycle.gif) | ![preview_multi_state](./arts/preview_multi_state.gif) | ![preview_recyclerview](./arts/preview_recyclerview.gif) | 21 | 22 | 23 | 24 | ## Done 25 | 26 | - **ConstraintLayout 1.x** 功能实践 27 | - 升级适配至 AndroidX 28 | - 介绍 KeyFrameSet 藏宝阁 29 | - 结合 MD 系列组件实现部分复杂交互效果 30 | - 与 **Lottie** 实现联动 31 | - 在 RecyclerView 中的应用 32 | 33 | 34 | ## Next 35 | 36 | - 介绍和使用 **KeyTrigger** 37 | - **Motion Editor** 使用介绍 38 | - **多状态**的介绍和使用 39 | - 优化和改造sample示例 40 | - 更新Readme和效果图 41 | 42 | ## Question Collection 43 | 44 | - 发现 KeyTrigger 在官方示例中无法正常运作问题 45 | - ~~官方提供的demo在通过 DrawerMotion 与 CoordinatorLayout 中已有 Motion 交互时出现 NestedScrollView 滑动问题~~ 46 | - ~~android.support 版 ConstrintLayout:2.0.0-beta2 包在运行demo代码时出现 motion 的 `progress` 无效问题,并且设置 debugMode 会闪退。问题详见:[#95](https://github.com/googlesamples/android-ConstraintLayoutExamples/issues/95)~~ 47 | 48 | ## Thanks 49 | 50 | > *[Using MotionLayout to Animate Android Apps](https://codelabs.developers.google.com/codelabs/motion-layout/index.html?index=..%2F..index#0)* 51 | > 52 | > *[MotionLayout官方介绍](https://developer.android.com/training/constraint-layout/motion-layout)* 53 | > 54 | > *[Introduction to MotionLayout](https://medium.com/google-developers/introduction-to-motionlayout-part-i-29208674b10d)* 55 | 56 | ## What's more? 57 | 58 | 每日一道面试题,挖掘更加强大的自己👉:[**Android Daily Interview**](https://github.com/Moosphan/Android-Daily-Interview) -------------------------------------------------------------------------------- /app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/.DS_Store -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.idea/workspace.xml 3 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | apply plugin: 'kotlin-android' 4 | 5 | apply plugin: 'kotlin-android-extensions' 6 | 7 | android { 8 | compileSdkVersion 28 9 | defaultConfig { 10 | applicationId "com.moos.constraint" 11 | minSdkVersion 21 12 | targetSdkVersion 28 13 | versionCode 1 14 | versionName "1.0" 15 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 16 | } 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | } 24 | 25 | dependencies { 26 | implementation fileTree(dir: 'libs', include: ['*.jar']) 27 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 28 | implementation 'androidx.appcompat:appcompat:1.1.0' 29 | implementation 'com.google.android.material:material:1.1.0' 30 | implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta8' 31 | implementation 'com.airbnb.android:lottie:2.5.1' 32 | implementation 'de.hdodenhof:circleimageview:3.0.0' 33 | testImplementation 'junit:junit:4.12' 34 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 35 | } 36 | -------------------------------------------------------------------------------- /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 22 | -------------------------------------------------------------------------------- /app/sampledata/descriptions: -------------------------------------------------------------------------------- 1 | When the whole world is about to rain, let’s make it clear in our heart together. 2 | Time goes by so fast, people go in and out of your life. You must never miss the opportunity to tell these people how much they mean to you. 3 | One needs 3 things to be truly happy living in the world: some thing to do, some one to love, some thing to hope for. 4 | No matter how bad your heart has been broken, the world doesn’t stop for your grief. The sun comes right back up the next day. 5 | Until you make peace with who you are, you’ll never be content with what you have. 6 | I’ll think of you every step of the way. -------------------------------------------------------------------------------- /app/sampledata/sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "username": "Cherry Lilly, US", 5 | "postTitle": "Today is rainy☔️", 6 | "postDescription": "When the whole world is about to rain, let’s make it clear in our heart together." 7 | }, 8 | { 9 | "username": "Michel Trade, UK", 10 | "postTitle": "A year passed again!", 11 | "postDescription": "Time goes by so fast, people go in and out of your life. You must never miss the opportunity to tell these people how much they mean to you.\n" 12 | }, 13 | { 14 | "username": "Moosphon AFeng, China", 15 | "postTitle": "What i have?️", 16 | "postDescription": "One needs 3 things to be truly happy living in the world: some thing to do, some one to love, some thing to hope for.\n" 17 | }, 18 | { 19 | "username": "Allen Jack, Germany", 20 | "postTitle": "Tomorrow is sunny\uD83C\uDF1E️", 21 | "postDescription": "No matter how bad your heart has been broken, the world doesn’t stop for your grief. The sun comes right back up the next day.\n" 22 | }, 23 | { 24 | "username": "Jimmy Peter, Japan", 25 | "postTitle": "We never like what we have..", 26 | "postDescription": "Until you make peace with who you are, you’ll never be content with what you have.\n" 27 | }, 28 | { 29 | "username": "Sandy Joke, Canada", 30 | "postTitle": "Now, i remind of you", 31 | "postDescription": "I’ll think of you every step of the way." 32 | } 33 | ] 34 | 35 | } -------------------------------------------------------------------------------- /app/sampledata/titles: -------------------------------------------------------------------------------- 1 | Today is rainy☔️ 2 | A year passed again 3 | What i have? 4 | Tomorrow is sunny🌞 5 | We never like what we have 6 | Now, i remind of you 7 | 8 | -------------------------------------------------------------------------------- /app/sampledata/users: -------------------------------------------------------------------------------- 1 | Cherry Lilly, US 2 | Michel Trade, UK 3 | Moosphon AFeng, China 4 | Allen Jack, Germany 5 | Jimmy Peter, Japan 6 | Sandy Joke, Canada -------------------------------------------------------------------------------- /app/src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/.DS_Store -------------------------------------------------------------------------------- /app/src/androidTest/java/com/moos/constraint/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint 2 | 3 | import android.support.test.InstrumentationRegistry 4 | import android.support.test.runner.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.getTargetContext() 22 | assertEquals("com.moos.constraint", appContext.packageName) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/.DS_Store -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/DetailActivity.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | 6 | class DetailActivity : AppCompatActivity() { 7 | 8 | override fun onCreate(savedInstanceState: Bundle?) { 9 | super.onCreate(savedInstanceState) 10 | setContentView(getLayoutId()) 11 | } 12 | 13 | private fun getLayoutId(): Int { 14 | return intent.getIntExtra(LAYOUT_ID_KEY, -1) 15 | } 16 | 17 | companion object { 18 | const val LAYOUT_ID_KEY = "124" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint 2 | 3 | import android.content.Intent 4 | import android.os.Bundle 5 | import androidx.appcompat.app.AppCompatActivity 6 | import androidx.recyclerview.widget.LinearLayoutManager 7 | import com.moos.constraint.adapter.EntranceListAdapter 8 | import com.moos.constraint.practice.* 9 | import kotlinx.android.synthetic.main.activity_main.* 10 | 11 | class MainActivity : AppCompatActivity() { 12 | override fun onCreate(savedInstanceState: Bundle?) { 13 | super.onCreate(savedInstanceState) 14 | setContentView(R.layout.activity_main) 15 | init() 16 | } 17 | 18 | private fun init() { 19 | recyclerView.layoutManager = LinearLayoutManager(this) 20 | 21 | val adapter = EntranceListAdapter(this) 22 | recyclerView.adapter = adapter 23 | adapter.setOnEntranceSelectListener { 24 | when(it) { 25 | 0 -> startActivity(Intent(this, MotionSampleActivity::class.java)) 26 | 1 -> startActivity(Intent(this, MultiBallActivity::class.java)) 27 | 2 -> startActivity(Intent(this, AppBarMotionActivity::class.java)) 28 | 3 -> startActivity(Intent(this, DrawerMotionActivity::class.java)) 29 | 4 -> startActivity(Intent(this, LottieMotionActivity::class.java)) 30 | 5 -> { 31 | val intent = Intent(this, DetailActivity::class.java) 32 | intent.putExtra(DetailActivity.LAYOUT_ID_KEY, R.layout.scene_trigger_sample) 33 | startActivity(intent) 34 | } 35 | 6 -> { 36 | val intent = Intent(this, DetailActivity::class.java) 37 | intent.putExtra(DetailActivity.LAYOUT_ID_KEY, R.layout.scene_key_cycle_sample) 38 | startActivity(intent) 39 | } 40 | 7 -> startActivity(Intent(this, UserGuideActivity::class.java)) 41 | 8 -> startActivity(Intent(this, MotionListActivity::class.java)) 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/MotionListActivity.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import androidx.recyclerview.widget.LinearLayoutManager 6 | import com.moos.constraint.adapter.MotionListAdapter 7 | import kotlinx.android.synthetic.main.activity_motion_list.* 8 | 9 | class MotionListActivity : AppCompatActivity() { 10 | 11 | private val data = arrayListOf( 12 | ContactPerson("Cherry Lilly, US", R.drawable.ic_user_lady2, "Today is rainy."), 13 | ContactPerson("Michel Trade, UK", R.drawable.ic_user_man1, "A year passed again"), 14 | ContactPerson("Allen Jack, Germany", R.drawable.ic_user_lady1, "Tomorrow is sunny\uD83C\uDF1E"), 15 | ContactPerson("Jimmy Peter, Japan", R.drawable.ic_user_man2, "We never like what we have.."), 16 | ContactPerson("Sandy Joke, Canada", R.drawable.ic_user_man1, "Now, I remind of you") 17 | ) 18 | 19 | override fun onCreate(savedInstanceState: Bundle?) { 20 | super.onCreate(savedInstanceState) 21 | setContentView(R.layout.activity_motion_list) 22 | 23 | recyclerView.layoutManager = LinearLayoutManager(this) 24 | val adapter = MotionListAdapter(this, data) 25 | recyclerView.adapter = adapter 26 | } 27 | 28 | data class ContactPerson( 29 | val name: String, 30 | val avatar: Int, 31 | val desc: String 32 | ) 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/adapter/EntranceListAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.adapter 2 | 3 | import android.content.Context 4 | import android.view.View 5 | import android.view.ViewGroup 6 | import android.widget.ImageView 7 | import android.widget.TextView 8 | import com.moos.constraint.R 9 | 10 | class EntranceListAdapter(ctx: Context): androidx.recyclerview.widget.RecyclerView.Adapter(){ 11 | 12 | private val entranceData = arrayListOf( 13 | Entrance( 14 | R.drawable.ic_announcement, 15 | "A ball translation", 16 | "小球运动" 17 | ), 18 | Entrance( 19 | R.drawable.ic_pie_chart, 20 | "Balls sport", 21 | "多球运动" 22 | ), 23 | Entrance( 24 | R.drawable.ic_presentation, 25 | "Motion applies with AppBar", 26 | "与AppBarLayout联动" 27 | ), 28 | Entrance( 29 | R.drawable.ic_savings, 30 | "Motion applies with Drawer", 31 | "与DrawerLayout联动" 32 | ), 33 | Entrance( 34 | R.drawable.ic_idea, 35 | "Motion applies with ViewPager", 36 | "和ViewPager、Lottie联动" 37 | ), 38 | Entrance( 39 | R.drawable.ic_browser, 40 | "Motion with KeyTrigger", 41 | "KeyTrigger的使用" 42 | ), 43 | Entrance( 44 | R.drawable.ic_chat, 45 | "Motion with KeyCycle", 46 | "KeyCycle实现钮扣抖动效果" 47 | ), 48 | Entrance( 49 | R.drawable.ic_user, 50 | "Multi scenes in User guide page", 51 | "多状态实现用户引导页" 52 | ), 53 | Entrance( 54 | R.drawable.ic_wallet, 55 | "Motion with RecyclerView", 56 | "在RecyclerView中的应用" 57 | ) 58 | ) 59 | 60 | 61 | private var mListener: ((position: Int) -> Unit)? = null 62 | 63 | override fun onCreateViewHolder(parent: ViewGroup, position: Int): EntranceViewHolder { 64 | return EntranceViewHolder( 65 | View.inflate( 66 | parent.context, 67 | R.layout.entrance_item_layout, 68 | null 69 | ) 70 | ) 71 | } 72 | 73 | override fun getItemCount(): Int { 74 | return entranceData.size 75 | } 76 | 77 | override fun onBindViewHolder(viewHolder: EntranceViewHolder, position: Int) { 78 | val tvDesc = viewHolder.itemView.findViewById(R.id.entrance_item_desc) 79 | val tvTip = viewHolder.itemView.findViewById(R.id.entrance_item_tip) 80 | val imageView = viewHolder.itemView.findViewById(R.id.entrance_item_ic) 81 | tvDesc.text = entranceData[position].info 82 | tvTip.text = entranceData[position].tip 83 | imageView.setImageResource(entranceData[position].icon) 84 | viewHolder.itemView.setOnClickListener { 85 | if (mListener != null) { 86 | mListener?.invoke(position) 87 | } 88 | } 89 | } 90 | /** 91 | * set entrance item click listener. 92 | */ 93 | fun setOnEntranceSelectListener(callback: (position: Int) -> Unit) { 94 | mListener = callback 95 | } 96 | 97 | 98 | class EntranceViewHolder(item: View): androidx.recyclerview.widget.RecyclerView.ViewHolder(item) 99 | 100 | data class Entrance( 101 | val icon: Int, 102 | val info: String, 103 | val tip: String = "" 104 | ) 105 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/adapter/MotionListAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.adapter 2 | 3 | import android.content.Context 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import android.widget.FrameLayout 8 | import android.widget.ImageView 9 | import android.widget.TextView 10 | import android.widget.Toast 11 | import androidx.constraintlayout.motion.widget.MotionLayout 12 | import androidx.recyclerview.widget.RecyclerView 13 | import com.moos.constraint.MotionListActivity 14 | import com.moos.constraint.R 15 | 16 | class MotionListAdapter(val context: Context, val list: ArrayList): RecyclerView.Adapter() { 17 | 18 | private var mLayoutInflater: LayoutInflater = LayoutInflater.from(context) 19 | 20 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { 21 | return MotionViewHolder(mLayoutInflater.inflate( 22 | R.layout.motion_list_rv_item, parent, false) 23 | ) 24 | } 25 | 26 | override fun getItemCount(): Int = list.size 27 | 28 | override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { 29 | val userText = holder.itemView.findViewById(R.id.item_username) 30 | val userDesc = holder.itemView.findViewById(R.id.item_desc) 31 | val userAvatar = holder.itemView.findViewById(R.id.item_user_avatar) 32 | val collectButton = holder.itemView.findViewById(R.id.box_collect) 33 | val deleteButton = holder.itemView.findViewById(R.id.box_delete) 34 | val motionBox = holder.itemView.findViewById(R.id.motionContainer) 35 | userText.text = list[position].name 36 | userDesc.text = list[position].desc 37 | userAvatar.setImageResource(list[position].avatar) 38 | collectButton.setOnClickListener { 39 | motionBox.transitionToStart() 40 | Toast.makeText(context, "收藏成功", Toast.LENGTH_SHORT).show() 41 | } 42 | 43 | deleteButton.setOnClickListener { 44 | Toast.makeText(context, "移除成功", Toast.LENGTH_SHORT).show() 45 | list.removeAt(holder.adapterPosition) 46 | notifyItemRemoved(holder.adapterPosition) 47 | } 48 | } 49 | 50 | class MotionViewHolder(item: View): RecyclerView.ViewHolder(item) 51 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/practice/AppBarMotionActivity.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.practice 2 | 3 | import android.os.Bundle 4 | import androidx.constraintlayout.motion.widget.MotionLayout 5 | import com.google.android.material.appbar.AppBarLayout 6 | import androidx.appcompat.app.AppCompatActivity 7 | import android.util.Log 8 | import com.moos.constraint.R 9 | import kotlinx.android.synthetic.main.activity_motion_with_app_bar.* 10 | 11 | class AppBarMotionActivity : AppCompatActivity() { 12 | 13 | override fun onCreate(savedInstanceState: Bundle?) { 14 | super.onCreate(savedInstanceState) 15 | setContentView(R.layout.activity_motion_with_app_bar) 16 | 17 | //applyMotionWithAppBar() 18 | } 19 | 20 | private fun applyMotionWithAppBar() { 21 | appBarLayout.addOnOffsetChangedListener(AppBarLayout.OnOffsetChangedListener { _, verticalOffset -> 22 | val seekPosition = -verticalOffset / (appBarLayout.totalScrollRange.toFloat()/5*3) 23 | motionLayout.progress = 1 - seekPosition 24 | }) 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/practice/DrawerMotionActivity.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.practice 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.moos.constraint.R 6 | //todo:fix scroll problem 7 | class DrawerMotionActivity: AppCompatActivity() { 8 | 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | setContentView(R.layout.activity_motion_with_drawer) 12 | 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/practice/LottieMotionActivity.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.practice 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.moos.constraint.R 6 | import com.moos.constraint.widget.PageFragment 7 | import kotlinx.android.synthetic.main.activity_motion_with_lottie.* 8 | 9 | /** 10 | * the practice of viewpager motion with lottie animation. 11 | * @author Moosphon on 2019/08/14 12 | */ 13 | class LottieMotionActivity : AppCompatActivity() { 14 | 15 | override fun onCreate(savedInstanceState: Bundle?) { 16 | super.onCreate(savedInstanceState) 17 | setContentView(R.layout.activity_motion_with_lottie) 18 | applyViewPagerMotion() 19 | } 20 | 21 | private fun applyViewPagerMotion() { 22 | val adapter = ViewPagerAdapter(supportFragmentManager) 23 | adapter.addPage("Now", R.layout.holder_layout) 24 | adapter.addPage("Discover", R.layout.holder_layout) 25 | viewPager.adapter = adapter 26 | tabLayout.setupWithViewPager(viewPager) 27 | viewPager.addOnPageChangeListener(header as androidx.viewpager.widget.ViewPager.OnPageChangeListener) 28 | } 29 | } 30 | 31 | 32 | class ViewPagerAdapter(fm: androidx.fragment.app.FragmentManager) : androidx.fragment.app.FragmentPagerAdapter(fm) { 33 | 34 | private val fragmentList = ArrayList() 35 | private val fragmentTitleList = ArrayList() 36 | 37 | override fun getItem(position: Int): androidx.fragment.app.Fragment { 38 | return fragmentList[position] 39 | } 40 | 41 | override fun getCount(): Int { 42 | return fragmentList.size 43 | } 44 | 45 | private fun addFragment(fragment: androidx.fragment.app.Fragment, title: String) { 46 | fragmentList.add(fragment) 47 | fragmentTitleList.add(title) 48 | } 49 | 50 | override fun getPageTitle(position: Int): CharSequence? { 51 | return fragmentTitleList[position] 52 | } 53 | 54 | fun addPage(s: String, layout: Int) { 55 | val page = PageFragment() 56 | val arg = Bundle() 57 | arg.putInt("layout", layout) 58 | page.arguments = arg 59 | addFragment(page, s) 60 | } 61 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/practice/MotionSampleActivity.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.practice 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import androidx.constraintlayout.motion.widget.MotionLayout 6 | import com.google.android.material.appbar.AppBarLayout 7 | import android.util.Log 8 | import com.moos.constraint.R 9 | import kotlinx.android.synthetic.main.activity_motion_with_app_bar.* 10 | 11 | /** 12 | * Created by moosphon on 2019.08.12 13 | * tips: just for testing some samples about MotionLayout. 14 | */ 15 | class MotionSampleActivity : AppCompatActivity() { 16 | 17 | override fun onCreate(savedInstanceState: Bundle?) { 18 | super.onCreate(savedInstanceState) 19 | //setContentView(R.layout.activity_motion_sample) 20 | setContentView(R.layout.sample_step1_layout) 21 | //initMotion() 22 | //applyMotionWithAppBar() 23 | } 24 | 25 | private fun initMotion() { 26 | appBarLayout.addOnOffsetChangedListener(AppBarLayout.OnOffsetChangedListener { _, verticalOffset -> 27 | val seekPosition = -verticalOffset / (appBarLayout.totalScrollRange.toFloat()/2) 28 | motionLayout.progress = seekPosition 29 | }) 30 | } 31 | 32 | private fun applyMotionWithAppBar() { 33 | val appBarLayout = findViewById(R.id.appBarLayout) 34 | val motionLayout = findViewById(R.id.motionLayout) 35 | appBarLayout.addOnOffsetChangedListener(AppBarLayout.OnOffsetChangedListener { _, verticalOffset -> 36 | val seekPosition = -verticalOffset / (appBarLayout.totalScrollRange.toFloat()/5*3) 37 | Log.e("MotionSampleActivity", "AppBar移动的距离:$seekPosition") 38 | motionLayout.progress = 1 - seekPosition 39 | }) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/practice/MultiBallActivity.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.practice 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.moos.constraint.R 6 | 7 | class MultiBallActivity : AppCompatActivity() { 8 | 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | setContentView(R.layout.activity_multi_ball_layout) 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/practice/UserGuideActivity.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.practice 2 | 3 | import android.os.Bundle 4 | import androidx.appcompat.app.AppCompatActivity 5 | import com.moos.constraint.R 6 | import kotlinx.android.synthetic.main.scene_user_guide_layout.* 7 | 8 | class UserGuideActivity: AppCompatActivity() { 9 | 10 | override fun onCreate(savedInstanceState: Bundle?) { 11 | super.onCreate(savedInstanceState) 12 | setContentView(R.layout.scene_user_guide_layout) 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/widget/DrawerContentLayout.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.widget 2 | 3 | import android.content.Context 4 | import androidx.constraintlayout.motion.widget.MotionLayout 5 | import androidx.drawerlayout.widget.DrawerLayout 6 | import android.util.AttributeSet 7 | import android.view.View 8 | 9 | class DrawerContentLayout @JvmOverloads constructor( 10 | context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 11 | ) : MotionLayout(context, attrs, defStyleAttr), androidx.drawerlayout.widget.DrawerLayout.DrawerListener { 12 | override fun onDrawerStateChanged(newState: Int) { 13 | } 14 | 15 | override fun onDrawerSlide(drawerView: View, slideOffset: Float) { 16 | progress = slideOffset 17 | } 18 | 19 | override fun onDrawerClosed(drawerView: View) { 20 | } 21 | 22 | override fun onDrawerOpened(drawerView: View) { 23 | } 24 | 25 | override fun onAttachedToWindow() { 26 | super.onAttachedToWindow() 27 | (parent as? androidx.drawerlayout.widget.DrawerLayout)?.addDrawerListener(this) 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/widget/MotionToolBar.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.widget 2 | 3 | import android.content.Context 4 | import androidx.constraintlayout.motion.widget.MotionLayout 5 | import com.google.android.material.appbar.AppBarLayout 6 | import android.util.AttributeSet 7 | import android.util.Log 8 | 9 | class MotionToolBar @JvmOverloads constructor( 10 | context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 11 | ) : MotionLayout(context, attrs, defStyleAttr), AppBarLayout.OnOffsetChangedListener { 12 | 13 | override fun onOffsetChanged(appBarLayout: AppBarLayout?, verticalOffset: Int) { 14 | Log.e("MotionToolBar", "onOffsetChanged: ----->$verticalOffset, scroll range--> ${appBarLayout?.totalScrollRange}") 15 | val seekPosition = -verticalOffset / (appBarLayout?.totalScrollRange!!.toFloat()/5*3) 16 | //progress = seekPosition 17 | //motion_in_app_bar下使用 18 | progress = 1 - seekPosition; 19 | } 20 | 21 | override fun onAttachedToWindow() { 22 | super.onAttachedToWindow() 23 | (parent as? AppBarLayout)?.addOnOffsetChangedListener(this) 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/widget/PageFragment.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.widget 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | 9 | class PageFragment : androidx.fragment.app.Fragment() { 10 | 11 | private var layoutId = 0 12 | 13 | override fun setArguments(args: Bundle?) { 14 | super.setArguments(args) 15 | if (args != null) { 16 | layoutId = args.getInt("layout") 17 | } 18 | } 19 | 20 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, 21 | savedInstanceState: Bundle?): View? { 22 | // Inflate the layout for this fragment 23 | return inflater.inflate(layoutId, container, false) 24 | } 25 | } -------------------------------------------------------------------------------- /app/src/main/java/com/moos/constraint/widget/ViewPagerHeader.kt: -------------------------------------------------------------------------------- 1 | package com.moos.constraint.widget 2 | 3 | import android.content.Context 4 | import androidx.constraintlayout.motion.widget.MotionLayout 5 | import androidx.viewpager.widget.ViewPager 6 | import android.util.AttributeSet 7 | import android.util.Log 8 | 9 | class ViewpagerHeader @JvmOverloads constructor( 10 | context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 11 | ) : MotionLayout(context, attrs, defStyleAttr), androidx.viewpager.widget.ViewPager.OnPageChangeListener { 12 | 13 | override fun onPageScrollStateChanged(state: Int) { 14 | } 15 | 16 | override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) { 17 | val animateProgress = (position.toFloat() + positionOffset)/3 18 | Log.e("LottieMotionActivity", "viewpager scroll progress is: $animateProgress") 19 | progress = animateProgress 20 | } 21 | 22 | override fun onPageSelected(position: Int) { 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/res/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/.DS_Store -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_user_lady1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable-xhdpi/ic_user_lady1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_user_lady2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable-xhdpi/ic_user_lady2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_user_man1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable-xhdpi/ic_user_man1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_user_man2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable-xhdpi/ic_user_man2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/card_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/guide_btn_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_basketball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable/ic_basketball.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 75 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_pie_chart.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 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 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable/ic_plus.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_sun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable/ic_sun.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/indicator_selected_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/indicator_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/moosphon_logo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable/moosphon_logo.jpeg -------------------------------------------------------------------------------- /app/src/main/res/drawable/oval_seekbar_thumb.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/quarter_circle_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/shanghai_night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable/shanghai_night.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/timeory_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable/timeory_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/tree_scene.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable/tree_scene.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/user_other.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Moosphan/MotionLayoutSamples/d9f749c90a0421ee93d3ab640cd6e98ce51390bd/app/src/main/res/drawable/user_other.jpg -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 19 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_motion_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_motion_sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | 22 | 27 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_motion_with_app_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 15 | 23 | 30 | 35 | 36 | 42 | 43 | 53 | 54 | 55 | 59 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_motion_with_lottie.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 18 | 23 | 28 | 29 | 38 | 39 | 40 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_multi_ball_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 16 | 17 | 23 | 29 | 35 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/entrance_item_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 20 | 21 | 27 | 40 | 41 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/res/layout/header_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 19 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/holder_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/motion_list_rv_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 20 | 26 | 31 | 39 | 48 | 49 | 50 | 51 | 56 | 62 | 63 | 68 | 74 | 75 | 76 | 82 | -------------------------------------------------------------------------------- /app/src/main/res/layout/sample_step1_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/sample_step2_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 16 | 21 | 26 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/sample_step3_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 17 | 18 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/sample_step4_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 17 | 18 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/sample_step5_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 19 | 28 | 33 | 34 | 42 | 43 | 44 | 48 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /app/src/main/res/layout/scene_key_cycle_sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 19 | 29 | 30 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/scene_loading_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/scene_search_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 17 | 21 | 29 | 36 | 44 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /app/src/main/res/layout/scene_simple_app_bar_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 15 | 23 | 28 | 29 | 38 | 39 | 40 | 44 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /app/src/main/res/layout/scene_trigger_sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 19 | 26 | 27 | 36 | 37 | 38 | 43 | 51 | 52 | 53 | 54 | 65 | -------------------------------------------------------------------------------- /app/src/main/res/layout/scene_user_guide_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 | 29 | 30 | 40 | 41 | 51 | 52 | 62 | 63 | 75 | 87 | 99 | 100 |