Commit dbab9091 by 霍志良

feat:修改底纹词

parent cbabfffb
ext {
dev_mode = false //组件发布的时候需要设置为false
dev_mode = true //组件发布的时候需要设置为false
ydl2PublishVersion = "0.2.0.14-SNAPSHOT"
ydlPublishVersion = [
// -------------- 业务模块 --------------
......
......@@ -73,7 +73,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
SwipeRefreshLayout.OnRefreshListener {
var bottomWordDisposable: Disposable? = null
private lateinit var bottomWordlist: List<FunctionWordBean>
private var searchWord: String? = ""
override fun showImage(url: String?, imgView: ImageView) {
YDLImageCacheManager.showImage(ExpertSearchActivity@ this, url, imgView)
}
......@@ -391,7 +391,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
initCategory = mIntent.getStringExtra(EXTRA_CATEGORY) ?: ""
initShowType = mIntent.getIntExtra(EXTRA_SHOW_TYPE, 0)
val relatedWord = mIntent.getStringExtra(EXTRA_RELATED_WORD) // 搜索内容的联想词
val searchWord = mIntent.getStringExtra(EXTRA_SEARCH_WORD)
searchWord = mIntent.getStringExtra(EXTRA_SEARCH_WORD)
val isRecommendWords = mIntent.getBooleanExtra(EXTRA_IS_RECCOMMEND_WORD, false)
if (!TextUtils.isEmpty(relatedWord)) { // 判断搜索内容的联想词为空,则用搜索词进行搜索
allFilter.searchWord = relatedWord
......@@ -422,11 +422,11 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
LogUtil.e("relatedWord:${relatedWord}")
if (!TextUtils.isEmpty(searchWord) && !TextUtils.isEmpty(relatedWord) && searchWord != relatedWord) {
if (doctorList.size > 0 && doctorList[0].is_head_view) {
doctorList[0] = ExpertServiceItem(true, searchWord, relatedWord)
doctorList[0] = ExpertServiceItem(true, searchWord.toString(), relatedWord)
} else if (doctorList.size > 0) {
doctorList.add(0, ExpertServiceItem(true, searchWord, relatedWord))
doctorList.add(0, ExpertServiceItem(true, searchWord.toString(), relatedWord))
} else {
doctorList.add(ExpertServiceItem(true, searchWord, relatedWord))
doctorList.add(ExpertServiceItem(true, searchWord.toString(), relatedWord))
}
} else {
if (doctorList.size > 0 && doctorList[0].is_head_view) {
......@@ -524,18 +524,23 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
//获取底纹词
bottomWordlist = wordBean!!
if (bottomWordlist.isNullOrEmpty()) return
if (bottomWordlist.size == 1) {
tv_search_content.text = bottomWordlist[0].word
if (!searchWord.isNullOrEmpty()) {
tv_search_content.text = searchWord
} else {
bottomWordDisposable = Observable.interval(0, 3, TimeUnit.SECONDS)
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
tv_search_content.text = bottomWordlist[(it % bottomWordlist.size).toInt()].word
}, {
}, {
if (bottomWordlist.size == 1) {
tv_search_content.text = bottomWordlist[0].word
} else {
bottomWordDisposable = Observable.interval(0, 3, TimeUnit.SECONDS)
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
tv_search_content.text =
bottomWordlist[(it % bottomWordlist.size).toInt()].word
}, {
}, {
})
}
}
}
......
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