-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of github.com:manondidi/kotlinArch
# Conflicts: # gradle/wrapper/gradle-wrapper.properties # kotlin_arch/src/main/java/com/czq/kotlin_arch/basePage/paging/BasePagingActivity.kt
- Loading branch information
Showing
17 changed files
with
289 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/czq/kotlinarch/template/cover/CoverActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.czq.kotlinarch.template.cover | ||
|
||
import com.czq.kotlin_arch.basePage.base.BaseActivity | ||
import com.czq.kotlinarch.R | ||
import kotlinx.android.synthetic.main.activity_cover.* | ||
|
||
class CoverActivity : BaseActivity<CoverContact.CoverPrensenter>(), CoverContact.CoverView { | ||
|
||
override fun createPresenter(): CoverContact.CoverPrensenter { | ||
return CoverPresenter(this) | ||
} | ||
|
||
override fun initView() { | ||
super.initView() | ||
|
||
btnContent.setOnClickListener { | ||
showContent() | ||
} | ||
btnEmpty.setOnClickListener { | ||
showEmpty() | ||
} | ||
btnError.setOnClickListener { | ||
showError() | ||
} | ||
btnLoading.setOnClickListener { | ||
showLoading() | ||
} | ||
} | ||
|
||
override fun getLayoutId(): Int { | ||
return R.layout.activity_cover | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/czq/kotlinarch/template/cover/CoverContact.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.czq.kotlinarch.template.cover | ||
|
||
import com.czq.kotlin_arch.basePage.base.IBasePrensenter | ||
import com.czq.kotlin_arch.basePage.base.IBaseView | ||
|
||
interface CoverContact { | ||
|
||
interface CoverView : IBaseView { | ||
|
||
} | ||
|
||
interface CoverPrensenter : IBasePrensenter { | ||
|
||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/czq/kotlinarch/template/cover/CoverFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.czq.kotlinarch.template.cover | ||
|
||
import com.czq.kotlin_arch.basePage.base.BaseFragment | ||
import com.czq.kotlinarch.R | ||
import kotlinx.android.synthetic.main.fragment_cover.* | ||
|
||
class CoverFragment : BaseFragment<CoverContact.CoverPrensenter>(), CoverContact.CoverView { | ||
|
||
|
||
companion object { | ||
fun newInstance():CoverFragment{ | ||
return CoverFragment() | ||
} | ||
} | ||
|
||
override fun createPresenter(): CoverContact.CoverPrensenter { | ||
return CoverPresenter(this) | ||
} | ||
|
||
override fun initView() { | ||
super.initView() | ||
|
||
} | ||
|
||
override fun getLayoutId(): Int { | ||
return R.layout.fragment_cover | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/czq/kotlinarch/template/cover/CoverPresenter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.czq.kotlinarch.template.cover | ||
|
||
import com.czq.kotlinarch.data.remote.RemoteDataRepository | ||
import com.uber.autodispose.lifecycle.autoDisposable | ||
import io.reactivex.android.schedulers.AndroidSchedulers | ||
import io.reactivex.schedulers.Schedulers | ||
|
||
class CoverPresenter(var mView: CoverContact.CoverView) : CoverContact.CoverPrensenter { | ||
|
||
override fun start() { | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.czq.kotlinarch.template.list; | ||
|
||
public class Item { | ||
} |
22 changes: 22 additions & 0 deletions
22
app/src/main/java/com/czq/kotlinarch/template/list/ItemBinder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.czq.kotlinarch.template.list | ||
|
||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.recyclerview.widget.RecyclerView | ||
import com.czq.kotlinarch.R | ||
import com.drakeet.multitype.ItemViewBinder | ||
|
||
|
||
class ItemBinder : ItemViewBinder<Item, ItemBinder.ViewHolder>() { | ||
|
||
override fun onCreateViewHolder(inflater: LayoutInflater, parent: ViewGroup): ViewHolder = | ||
ViewHolder(inflater.inflate(R.layout.item, parent, false)) | ||
|
||
override fun onBindViewHolder(holder: ViewHolder, itemData: Item) { | ||
} | ||
|
||
class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {} | ||
|
||
|
||
} |
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/czq/kotlinarch/template/list/ListActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.czq.kotlinarch.template.list | ||
|
||
import com.czq.kotlin_arch.basePage.paging.BasePagingActivity | ||
import com.czq.kotlinarch.R | ||
|
||
|
||
class ListActivity : BasePagingActivity<ListContact.PagingListPresenter>(), | ||
ListContact.PagingListView { | ||
|
||
|
||
override fun registItemBinder() { | ||
multiAdapter.register(ItemBinder()) | ||
|
||
} | ||
|
||
override fun initView() { | ||
super.initView() | ||
|
||
} | ||
|
||
|
||
|
||
|
||
override fun getLayoutId(): Int { | ||
return R.layout.activity_list | ||
} | ||
|
||
override fun createPresenter(): ListContact.PagingListPresenter { | ||
return ListPresenter(this) | ||
} | ||
|
||
|
||
} |
18 changes: 18 additions & 0 deletions
18
app/src/main/java/com/czq/kotlinarch/template/list/ListContact.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.czq.kotlinarch.template.list | ||
|
||
import com.czq.kotlin_arch.basePage.base.IBasePagingPrensenter | ||
import com.czq.kotlin_arch.basePage.base.IBasePagingView | ||
|
||
class ListContact { | ||
|
||
|
||
interface PagingListView : IBasePagingView { | ||
|
||
} | ||
|
||
interface PagingListPresenter : IBasePagingPrensenter { | ||
|
||
} | ||
|
||
|
||
} |
31 changes: 31 additions & 0 deletions
31
app/src/main/java/com/czq/kotlinarch/template/list/ListFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.czq.kotlinarch.template.list | ||
|
||
import com.czq.kotlin_arch.basePage.paging.BasePagingFragment | ||
import com.czq.kotlinarch.R | ||
|
||
class ListFragment : BasePagingFragment<ListContact.PagingListPresenter>(), ListContact.PagingListView { | ||
|
||
companion object { | ||
fun newInstance():ListFragment{ | ||
return ListFragment() | ||
} | ||
} | ||
|
||
override fun registItemBinder() { | ||
multiAdapter.register(ItemBinder()) | ||
} | ||
|
||
override fun createPresenter(): ListContact.PagingListPresenter { | ||
return ListPresenter(this) | ||
} | ||
|
||
override fun getLayoutId(): Int { | ||
return R.layout.fragment_paging_list | ||
} | ||
|
||
override fun initView() { | ||
super.initView() | ||
} | ||
|
||
|
||
} |
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/czq/kotlinarch/template/list/ListPresenter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.czq.kotlinarch.template.list | ||
|
||
import android.annotation.SuppressLint | ||
import com.czq.kotlin_arch.basePage.base.BasePagingPrensenterImpl | ||
import com.czq.kotlin_arch.paging.PagingStrategy | ||
|
||
open class ListPresenter(mView: ListContact.PagingListView) : BasePagingPrensenterImpl(mView), | ||
ListContact.PagingListPresenter { | ||
|
||
|
||
override fun getPagingStrategy(): PagingStrategy? { | ||
return null | ||
} | ||
|
||
@SuppressLint("CheckResult") | ||
override fun onLoadData(pagingStrategy: PagingStrategy?) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<com.czq.kotlin_arch.component.cover.CoverFrameLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/coverLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<com.scwang.smartrefresh.layout.SmartRefreshLayout | ||
android:id="@+id/refreshLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/pagingRecycleview" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" /> | ||
|
||
|
||
</com.scwang.smartrefresh.layout.SmartRefreshLayout> | ||
|
||
<include | ||
android:id="@+id/stickyHeaderView" | ||
layout="@layout/game_item_date"/> | ||
|
||
</com.czq.kotlin_arch.component.cover.CoverFrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="80dp" | ||
android:background="@color/white" | ||
> | ||
|
||
<ImageView | ||
android:id="@+id/ivIcon" | ||
android:layout_width="56dp" | ||
android:layout_height="56dp" | ||
android:layout_marginLeft="15dp" | ||
android:layout_marginRight="15dp" | ||
android:layout_centerVertical="true" | ||
/> | ||
|
||
<TextView | ||
android:id="@+id/tvName" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_toRightOf="@id/ivIcon" | ||
android:layout_centerVertical="true" | ||
android:textSize="16dp" | ||
android:textColor="#1c1c1c" | ||
android:text="1212121212" | ||
/> | ||
|
||
<View | ||
android:layout_width="match_parent" | ||
android:layout_height="1dp" | ||
android:background="@color/base_divider_color" | ||
android:layout_alignParentBottom="true" | ||
android:layout_marginLeft="15dp" | ||
android:layout_marginRight="15dp" | ||
/> | ||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Wed Jul 01 20:31:46 CST 2020 | ||
#Mon Aug 09 08:57:38 CST 2021 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters