Skip to content

Commit

Permalink
feat:apply with recyclerview
Browse files Browse the repository at this point in the history
  • Loading branch information
Moosphan committed Sep 9, 2020
1 parent b8336b3 commit c9fd805
Show file tree
Hide file tree
Showing 43 changed files with 601 additions and 58 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified .gradle/5.1.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/5.1.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/5.1.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/5.1.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/5.1.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/5.1.1/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file modified .gradle/5.1.1/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file modified .gradle/5.1.1/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified .gradle/5.1.1/javaCompile/taskHistory.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions .idea/assetWizardSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules/app/MotionLayoutSamples.app.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,28 @@ This project contains android ConstraintLayout2.0 usages and MotionLayout usage,

## Effect Preview

| :dark_sunglasses: | :deciduous_tree: | :green_salad: |
| :----------------------------------------------------: | :----------------------------------------------------: | :------------------------------------------: |
| ![preview_balls_sport](./arts/preview_balls_sport.gif) | ![preview_appbar](./arts/preview_appbar.gif) | ![preview_lottie](./arts/preview_lottie.gif) |
| ![preview_keycycle](./arts/preview_keycycle.gif) | ![preview_multi_state](./arts/preview_multi_state.gif) | |
| :dark_sunglasses: | :deciduous_tree: | :green_salad: |
| :----------------------------------------------------: | :----------------------------------------------------: | :------------------------------------------------------: |
| ![preview_balls_sport](./arts/preview_balls_sport.gif) | ![preview_appbar](./arts/preview_appbar.gif) | ![preview_lottie](./arts/preview_lottie.gif) |
| ![preview_keycycle](./arts/preview_keycycle.gif) | ![preview_multi_state](./arts/preview_multi_state.gif) | ![preview_recyclerview](./arts/preview_recyclerview.gif) |



## Done

- **ConstraintLayout 1.x** 功能实践

- 升级适配至 AndroidX

- 介绍 KeyFrameSet 藏宝阁

- 结合 MD 系列组件实现部分复杂交互效果

-**Lottie** 实现联动
- 在 RecyclerView 中的应用


## Next

- 介绍和使用 **KeyTrigger**
- **Motion Editor** 使用介绍
- **多状态**的介绍和使用
-**RecyclerView** 的强强联合
- 优化和改造sample示例
- 更新Readme和效果图

Expand Down
Binary file modified app/.DS_Store
Binary file not shown.
Binary file modified app/src/.DS_Store
Binary file not shown.
Binary file modified app/src/main/.DS_Store
Binary file not shown.
38 changes: 19 additions & 19 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.moos.constraint">
xmlns:tools="http://schemas.android.com/tools"
package="com.moos.constraint">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".practice.UserGuideActivity"/>
<activity android:name=".practice.MotionSampleActivity"/>
<activity android:name=".practice.AppBarMotionActivity"/>
<activity android:name=".practice.LottieMotionActivity"/>
<activity android:name=".practice.DrawerMotionActivity"/>
<activity android:name=".practice.MultiBallActivity"/>
<activity android:name=".DetailActivity">
</activity>
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".MotionListActivity"></activity>
<activity android:name=".practice.UserGuideActivity" />
<activity android:name=".practice.MotionSampleActivity" />
<activity android:name=".practice.AppBarMotionActivity" />
<activity android:name=".practice.LottieMotionActivity" />
<activity android:name=".practice.DrawerMotionActivity" />
<activity android:name=".practice.MultiBallActivity" />
<activity android:name=".DetailActivity"></activity>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/moos/constraint/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import com.moos.constraint.adapter.EntranceListAdapter
import com.moos.constraint.practice.*
import kotlinx.android.synthetic.main.activity_main.*

Expand Down Expand Up @@ -37,6 +38,7 @@ class MainActivity : AppCompatActivity() {
startActivity(intent)
}
7 -> startActivity(Intent(this, UserGuideActivity::class.java))
8 -> startActivity(Intent(this, MotionListActivity::class.java))
}
}
}
Expand Down
33 changes: 33 additions & 0 deletions app/src/main/java/com/moos/constraint/MotionListActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.moos.constraint

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import com.moos.constraint.adapter.MotionListAdapter
import kotlinx.android.synthetic.main.activity_motion_list.*

class MotionListActivity : AppCompatActivity() {

private val data = arrayListOf<ContactPerson>(
ContactPerson("Cherry Lilly, US", R.drawable.ic_user_lady2, "Today is rainy."),
ContactPerson("Michel Trade, UK", R.drawable.ic_user_man1, "A year passed again"),
ContactPerson("Allen Jack, Germany", R.drawable.ic_user_lady1, "Tomorrow is sunny\uD83C\uDF1E"),
ContactPerson("Jimmy Peter, Japan", R.drawable.ic_user_man2, "We never like what we have.."),
ContactPerson("Sandy Joke, Canada", R.drawable.ic_user_man1, "Now, I remind of you")
)

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_motion_list)

recyclerView.layoutManager = LinearLayoutManager(this)
val adapter = MotionListAdapter(this, data)
recyclerView.adapter = adapter
}

data class ContactPerson(
val name: String,
val avatar: Int,
val desc: String
)
}
Loading

0 comments on commit c9fd805

Please sign in to comment.