Commit 4b2e2b1a by konghaorui

修改咨询组件版本号

parent c9a1de54
...@@ -43,7 +43,7 @@ ext { ...@@ -43,7 +43,7 @@ ext {
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.21", "m-confide" : "0.0.21",
"m-consultant" : "0.0.36", "m-consultant" : "0.0.38",
"m-course" : "0.0.17", "m-course" : "0.0.17",
"m-fm" : "0.0.15", "m-fm" : "0.0.15",
"m-muse" : "0.0.12", "m-muse" : "0.0.12",
......
...@@ -10,6 +10,7 @@ import android.content.Intent ...@@ -10,6 +10,7 @@ import android.content.Intent
import android.graphics.Typeface import android.graphics.Typeface
import android.os.Build import android.os.Build
import android.support.v4.content.ContextCompat import android.support.v4.content.ContextCompat
import android.support.v4.widget.SwipeRefreshLayout
import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView
import android.text.TextUtils import android.text.TextUtils
...@@ -66,7 +67,8 @@ import java.util.concurrent.Executors ...@@ -66,7 +67,8 @@ import java.util.concurrent.Executors
@Route(path = "/consult/list") @Route(path = "/consult/list")
class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPresenter>(), View.OnClickListener, IExpertSearchView, class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPresenter>(), View.OnClickListener, IExpertSearchView,
OnCategoriesSelectedListener, OnSortItemSelectedListener, OnFilterConfirmListener { OnCategoriesSelectedListener, OnSortItemSelectedListener, OnFilterConfirmListener,
SwipeRefreshLayout.OnRefreshListener {
override fun showImage(url: String?, imgView: ImageView) { override fun showImage(url: String?, imgView: ImageView) {
YDLImageCacheManager.showImage(ExpertSearchActivity@ this, url, imgView) YDLImageCacheManager.showImage(ExpertSearchActivity@ this, url, imgView)
...@@ -195,6 +197,9 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -195,6 +197,9 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
btn_call.setOnClickListener(this) btn_call.setOnClickListener(this)
tv_guide.setOnClickListener(this) tv_guide.setOnClickListener(this)
rl_search.setOnClickListener(this) rl_search.setOnClickListener(this)
srlContainer.setColorSchemeColors(ContextCompat.getColor(this, R.color.consultant_main_theme))
srlContainer.setProgressViewOffset(false, 0, 200)
srlContainer.setOnRefreshListener(this)
initNetLossView() initNetLossView()
...@@ -1365,6 +1370,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres ...@@ -1365,6 +1370,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
} }
} }
override fun onRefresh() {
refresh(false)
}
//刷新列表 //刷新列表
private fun refresh(isShowRefresh: Boolean? = true) { private fun refresh(isShowRefresh: Boolean? = true) {
srlContainer.isRefreshing = isShowRefresh!! srlContainer.isRefreshing = isShowRefresh!!
......
...@@ -8,6 +8,7 @@ import android.content.Context ...@@ -8,6 +8,7 @@ import android.content.Context
import android.graphics.Typeface import android.graphics.Typeface
import android.os.Build import android.os.Build
import android.support.v4.content.ContextCompat import android.support.v4.content.ContextCompat
import android.support.v4.widget.SwipeRefreshLayout
import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView import android.support.v7.widget.RecyclerView
import android.text.TextUtils import android.text.TextUtils
...@@ -61,7 +62,10 @@ import org.json.JSONObject ...@@ -61,7 +62,10 @@ import org.json.JSONObject
import java.util.concurrent.Executors import java.util.concurrent.Executors
class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPresenter>(), View.OnClickListener, IExpertSearchView, class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPresenter>(), View.OnClickListener, IExpertSearchView,
OnCategoriesSelectedListener, OnSortItemSelectedListener, OnFilterConfirmListener { OnCategoriesSelectedListener, OnSortItemSelectedListener, OnFilterConfirmListener,
SwipeRefreshLayout.OnRefreshListener {
override fun layoutResId(): Int { override fun layoutResId(): Int {
return R.layout.consultant_activity_expert_search_list return R.layout.consultant_activity_expert_search_list
} }
...@@ -146,7 +150,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -146,7 +150,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
btn_call.setOnClickListener(this) btn_call.setOnClickListener(this)
tv_guide.setOnClickListener(this) tv_guide.setOnClickListener(this)
rl_search.setOnClickListener(this) rl_search.setOnClickListener(this)
srlContainer.setColorSchemeColors(ContextCompat.getColor(activity, R.color.consultant_main_theme))
srlContainer.setProgressViewOffset(false, 0, 200)
srlContainer.setOnRefreshListener(this)
initNetLossView() initNetLossView()
...@@ -1296,6 +1302,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1296,6 +1302,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
} }
} }
override fun onRefresh() {
refresh(false)
}
//刷新列表 //刷新列表
private fun refresh(isShowRefresh: Boolean? = true) { private fun refresh(isShowRefresh: Boolean? = true) {
srlContainer.isRefreshing = isShowRefresh!! srlContainer.isRefreshing = isShowRefresh!!
...@@ -1308,7 +1318,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres ...@@ -1308,7 +1318,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
curPage = 1 curPage = 1
onScrollListener.resetState() onScrollListener.resetState()
getPresenter().fetchListData(allFilter, curPage) getPresenter().fetchListData(allFilter, curPage)
rvExperts.scrollToPosition(0) rvExperts.scrollToPosition(0)
} }
//执行搜索 //执行搜索
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment