Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Aug 13, 2020
1 parent ab4cf38 commit 0e66006
Show file tree
Hide file tree
Showing 20 changed files with 256 additions and 32 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

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

139 changes: 139 additions & 0 deletions .idea/codeStyles/Project.xml

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

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

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

6 changes: 6 additions & 0 deletions .idea/compiler.xml

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

22 changes: 22 additions & 0 deletions .idea/gradle.xml

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

30 changes: 30 additions & 0 deletions .idea/jarRepositories.xml

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

9 changes: 9 additions & 0 deletions .idea/misc.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

32 changes: 17 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 30
buildToolsVersion "30.0.1"

defaultConfig {
applicationId "com.hoc.mergeadapter_sample"
applicationId "com.hoc.concatdapter_sample"
minSdkVersion 23
targetSdkVersion 29
targetSdkVersion 30
versionCode 1
versionName "1.0"

Expand Down Expand Up @@ -42,19 +42,21 @@ dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha03'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
implementation 'androidx.fragment:fragment-ktx:1.2.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01'
implementation 'androidx.core:core-ktx:1.5.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-rc1'
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha05'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01'

implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-alpha06'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0-alpha06'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0-alpha06'

implementation 'androidx.fragment:fragment-ktx:1.3.0-alpha07'

// coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8'

testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hoc.mergeadapter_sample
package com.hoc.concatadapter_sample

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hoc.mergeadapter_sample">
package="com.hoc.concatadapter_sample">

<application
android:allowBackup="true"
Expand All @@ -9,13 +9,15 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hoc.mergeadapter_sample
package com.hoc.concatadapter_sample

import android.util.Log
import kotlinx.coroutines.Dispatchers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.hoc.mergeadapter_sample
package com.hoc.concatadapter_sample

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
import com.hoc.mergeadapter_sample.databinding.ItemFooterBinding
import com.hoc.concatadapter_sample.databinding.ItemFooterBinding

class FooterAdapter(private val onRetry: () -> Unit) :
ListAdapter<PlaceholderState, FooterAdapter.VH>(object :
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.hoc.mergeadapter_sample
package com.hoc.concatadapter_sample

import android.os.Bundle
import android.view.View
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.ConcatAdapter
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.MergeAdapter
import androidx.recyclerview.widget.RecyclerView
import com.hoc.mergeadapter_sample.databinding.ActivityMainBinding
import com.hoc.concatadapter_sample.databinding.ActivityMainBinding
import kotlin.LazyThreadSafetyMode.NONE

class MainActivity : AppCompatActivity() {
Expand All @@ -27,7 +27,7 @@ class MainActivity : AppCompatActivity() {
binding.recyclerView.run {
setHasFixedSize(true)
layoutManager = linearLayoutManager
adapter = MergeAdapter(userAdapter, footerAdapter)
adapter = ConcatAdapter(userAdapter, footerAdapter)
}

// observe livedatas
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.hoc.mergeadapter_sample
package com.hoc.concatadapter_sample

import androidx.annotation.MainThread
import androidx.lifecycle.*
import com.hoc.mergeadapter_sample.PlaceholderState.*
import com.hoc.concatadapter_sample.PlaceholderState.*
import kotlinx.coroutines.launch
import kotlin.LazyThreadSafetyMode.NONE

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.hoc.mergeadapter_sample
package com.hoc.concatadapter_sample

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
import com.hoc.mergeadapter_sample.databinding.ItemUserBinding
import com.hoc.concatadapter_sample.databinding.ItemUserBinding

class UserAdapter :
ListAdapter<User, UserAdapter.VH>(object : DiffUtil.ItemCallback<User>() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hoc.mergeadapter_sample
package com.hoc.concatadapter_sample

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
Expand Down
Loading

0 comments on commit 0e66006

Please sign in to comment.