Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
c2c21df2
Commit
c2c21df2
authored
Dec 17, 2019
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
咨询师首页顶部多种banner布局开发完成
parent
6e7b007c
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
1414 additions
and
214 deletions
+1414
-214
build.gradle
app/build.gradle
+3
-3
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+8
-7
activity_main.xml
app/src/main/res/layout/activity_main.xml
+2
-1
config.gradle
config.gradle
+3
-3
ExpertSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
+0
-35
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+0
-36
ExpertSearchPresenter.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchPresenter.kt
+0
-20
IExpertSearchView.kt
m-consultant/src/main/java/com/yidianling/consultant/IExpertSearchView.kt
+0
-1
ExpertSearchBigShotBean.java
m-consultant/src/main/java/com/yidianling/consultant/bean/ExpertSearchBigShotBean.java
+225
-0
ExpertSearchRecommandBean.java
m-consultant/src/main/java/com/yidianling/consultant/bean/ExpertSearchRecommandBean.java
+226
-0
ExpertSearchTopShowBean.kt
m-consultant/src/main/java/com/yidianling/consultant/bean/ExpertSearchTopShowBean.kt
+7
-0
ExpertSearchHttpImpl.kt
m-consultant/src/main/java/com/yidianling/consultant/http/ExpertSearchHttpImpl.kt
+3
-2
IExpertSearchHttp.kt
m-consultant/src/main/java/com/yidianling/consultant/http/IExpertSearchHttp.kt
+7
-4
SearchApi.kt
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
+7
-5
BigShotOneView.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/BigShotOneView.kt
+58
-0
BigShotThreeView.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/BigShotThreeView.kt
+73
-0
BigShotTwoView.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/BigShotTwoView.kt
+64
-0
RecommendItemView.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/RecommendItemView.kt
+78
-0
RecommendListView.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/RecommendListView.kt
+342
-0
consultant_indicator_selected.xml
m-consultant/src/main/res/drawable/consultant_indicator_selected.xml
+13
-0
consultant_indicator_unselected.xml
m-consultant/src/main/res/drawable/consultant_indicator_unselected.xml
+13
-0
consultant_activity_expert_search_list.xml
m-consultant/src/main/res/layout/consultant_activity_expert_search_list.xml
+61
-58
consultant_expert_search_big_shot_one.xml
m-consultant/src/main/res/layout/consultant_expert_search_big_shot_one.xml
+22
-0
consultant_expert_search_big_shot_three.xml
m-consultant/src/main/res/layout/consultant_expert_search_big_shot_three.xml
+55
-0
consultant_expert_search_big_shot_two.xml
m-consultant/src/main/res/layout/consultant_expert_search_big_shot_two.xml
+39
-0
consultant_expert_search_big_shot_view.xml
m-consultant/src/main/res/layout/consultant_expert_search_big_shot_view.xml
+10
-0
consultant_expert_search_top_all_view.xml
m-consultant/src/main/res/layout/consultant_expert_search_top_all_view.xml
+46
-0
consultant_expert_search_top_item_view.xml
m-consultant/src/main/res/layout/consultant_expert_search_top_item_view.xml
+49
-0
consultant_layout_search_head_bg.xml
m-consultant/src/main/res/layout/consultant_layout_search_head_bg.xml
+0
-39
No files found.
app/build.gradle
View file @
c2c21df2
...
@@ -184,7 +184,7 @@ dependencies {
...
@@ -184,7 +184,7 @@ dependencies {
api
project
(
':m-tests'
)
api
project
(
':m-tests'
)
api
project
(
':m-consultant'
)
api
project
(
':m-consultant'
)
implementation
modularPublication
(
'com.ydl:m-consultant-api'
)
implementation
modularPublication
(
'com.ydl:m-consultant-api'
)
api
project
(
':m-confide'
)
//
api project(':m-confide')
// api "com.ydl:m-consultant-api:0.0.2"
// api "com.ydl:m-consultant-api:0.0.2"
// api 'com.ydl:m-consultant-module-ydl:0.0.18@aar'
// api 'com.ydl:m-consultant-module-ydl:0.0.18@aar'
...
@@ -198,12 +198,12 @@ dependencies {
...
@@ -198,12 +198,12 @@ dependencies {
implementation
project
(
':ydl-media'
)
implementation
project
(
':ydl-media'
)
implementation
project
(
':m-muse'
)
//
implementation project(':m-muse')
// api rootProject.ext.dependencies["ydl-m-fm-module-ydl"]
// api rootProject.ext.dependencies["ydl-m-fm-module-ydl"]
// api rootProject.ext.dependencies["ydl-m-fm-api"]
// api rootProject.ext.dependencies["ydl-m-fm-api"]
api
project
(
':m-fm'
)
//
api project(':m-fm')
api
project
(
':m-course'
)
api
project
(
':m-course'
)
implementation
modularPublication
(
'com.ydl:m-fm-api'
)
implementation
modularPublication
(
'com.ydl:m-fm-api'
)
implementation
modularPublication
(
'com.ydl:m-audioim-api'
)
implementation
modularPublication
(
'com.ydl:m-audioim-api'
)
...
...
app/src/main/java/com/ydl/component/MainActivity.kt
View file @
c2c21df2
...
@@ -10,14 +10,15 @@ import android.net.Uri
...
@@ -10,14 +10,15 @@ import android.net.Uri
import
android.os.IBinder
import
android.os.IBinder
import
android.provider.Settings
import
android.provider.Settings
import
android.util.Log
import
android.util.Log
import
android.widget.LinearLayout
import
com.alibaba.android.arouter.launcher.ARouter
import
com.alibaba.android.arouter.launcher.ARouter
import
com.tbruyelle.rxpermissions2.RxPermissions
import
com.tbruyelle.rxpermissions2.RxPermissions
import
com.umeng.analytics.MobclickAgent
import
com.umeng.analytics.MobclickAgent
import
com.ydl.audioim.YDLavManager
//
import com.ydl.audioim.YDLavManager
import
com.ydl.component.music.MusicPlayActivity
import
com.ydl.component.music.MusicPlayActivity
import
com.ydl.component.mvp.DemoContract
import
com.ydl.component.mvp.DemoContract
import
com.ydl.component.mvp.DemoPresenter
import
com.ydl.component.mvp.DemoPresenter
import
com.ydl.confide.home.ConfideHomeActivity
//
import com.ydl.confide.home.ConfideHomeActivity
import
com.ydl.media.audio.PlayService
import
com.ydl.media.audio.PlayService
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydl_router.manager.YDLRouterParams
...
@@ -63,7 +64,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -63,7 +64,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
override
fun
initDataAndEvent
()
{
override
fun
initDataAndEvent
()
{
YDLavManager
.
instances
.
init
(
this
,
"3387e9b251f3491e9221a9877e8f7830"
)
//
YDLavManager.instances.init(this, "3387e9b251f3491e9221a9877e8f7830")
bindService
()
bindService
()
reLoadData
()
reLoadData
()
...
@@ -97,10 +98,10 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
...
@@ -97,10 +98,10 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bt_to_tests
.
setOnClickListener
{
bt_to_tests
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
NewTestHomeActivity
::
class
.
java
))
startActivity
(
Intent
(
this
,
NewTestHomeActivity
::
class
.
java
))
}
}
bt_to_confide
.
setOnClickListener
{
//
bt_to_confide.setOnClickListener {
YDLavManager
.
instances
.
login
(
"1193016"
)
//
YDLavManager.instances.login("1193016")
startActivity
(
Intent
(
this
,
ConfideHomeActivity
::
class
.
java
))
//
startActivity(Intent(this, ConfideHomeActivity::class.java))
}
//
}
bt_to_muse
.
setOnClickListener
{
bt_to_muse
.
setOnClickListener
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_MUSE
,
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_MUSE
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
MUSIC_URL
,
"http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3"
)
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
MUSIC_URL
,
"http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3"
)
...
...
app/src/main/res/layout/activity_main.xml
View file @
c2c21df2
...
@@ -156,6 +156,6 @@
...
@@ -156,6 +156,6 @@
<com.ydl.ydlcommon.mvp.lce.view.YDLStateView
<com.ydl.ydlcommon.mvp.lce.view.YDLStateView
android:id=
"@+id/lce_state_view"
android:id=
"@+id/lce_state_view"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"30
0
dp"
/>
android:layout_height=
"30dp"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
config.gradle
View file @
c2c21df2
ext
{
ext
{
kotlin_version
=
"1.3.21"
kotlin_version
=
"1.3.21"
dev_mode
=
fals
e
dev_mode
=
tru
e
ydl_app
=
[
ydl_app
=
[
appName
:
"心理咨询壹点灵"
,
appName
:
"心理咨询壹点灵"
,
...
@@ -43,8 +43,8 @@ ext {
...
@@ -43,8 +43,8 @@ ext {
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.4
0
"
,
"m-confide"
:
"0.0.4
1
"
,
"m-consultant"
:
"0.0.
49
"
,
"m-consultant"
:
"0.0.
51
"
,
"m-fm"
:
"0.0.23"
,
"m-fm"
:
"0.0.23"
,
"m-user"
:
"0.0.39"
,
"m-user"
:
"0.0.39"
,
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
View file @
c2c21df2
...
@@ -28,17 +28,14 @@ import com.ydl.webview.NewH5Activity
...
@@ -28,17 +28,14 @@ import com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import
com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.ui.LogoLoadingView
import
com.ydl.ydlcommon.ui.LogoLoadingView
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.ydl.ydlcommon.view.banner.GlideImageLoader
import
com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import
com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.common.tools.RxDeviceTool
...
@@ -51,7 +48,6 @@ import com.yidianling.consultant.listener.OnFilterConfirmListener
...
@@ -51,7 +48,6 @@ import com.yidianling.consultant.listener.OnFilterConfirmListener
import
com.yidianling.consultant.listener.OnSortItemSelectedListener
import
com.yidianling.consultant.listener.OnSortItemSelectedListener
import
com.yidianling.consultant.model.bean.*
import
com.yidianling.consultant.model.bean.*
import
com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
import
com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
import
com.yidianling.consultant.modular.utils.TempH5RouteUtils
import
com.yidianling.consultant.router.ConsultantIn
import
com.yidianling.consultant.router.ConsultantIn
import
com.yidianling.consultant.ui.view.AreaPopupWindow
import
com.yidianling.consultant.ui.view.AreaPopupWindow
import
com.yidianling.consultant.ui.view.CategoryPopupWindow
import
com.yidianling.consultant.ui.view.CategoryPopupWindow
...
@@ -60,7 +56,6 @@ import com.yidianling.consultant.ui.view.SortPopupWindow
...
@@ -60,7 +56,6 @@ import com.yidianling.consultant.ui.view.SortPopupWindow
import
kotlinx.android.synthetic.main.consultant_activity_expert_search_list.*
import
kotlinx.android.synthetic.main.consultant_activity_expert_search_list.*
import
kotlinx.android.synthetic.main.consultant_item_filter_online.view.*
import
kotlinx.android.synthetic.main.consultant_item_filter_online.view.*
import
kotlinx.android.synthetic.main.consultant_layout_search_content.*
import
kotlinx.android.synthetic.main.consultant_layout_search_content.*
import
kotlinx.android.synthetic.main.consultant_layout_search_head_bg.*
import
kotlinx.android.synthetic.main.consultant_layout_search_toolbar.*
import
kotlinx.android.synthetic.main.consultant_layout_search_toolbar.*
import
org.json.JSONObject
import
org.json.JSONObject
import
java.util.concurrent.Executors
import
java.util.concurrent.Executors
...
@@ -367,8 +362,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
...
@@ -367,8 +362,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
getPresenter
().
fetchListHead
()
getPresenter
().
fetchListHead
()
//加载本地缓存数据
//加载本地缓存数据
getPresenter
().
localData
(
initShowType
)
getPresenter
().
localData
(
initShowType
)
//加载banner
getPresenter
().
fetchBannerList
()
refresh
(
false
)
refresh
(
false
)
v_loading
.
visibility
=
View
.
VISIBLE
v_loading
.
visibility
=
View
.
VISIBLE
...
@@ -379,34 +372,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
...
@@ -379,34 +372,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
}
}
}
}
override
fun
onBannerListFetched
(
data
:
MutableList
<
ExpertBannerBean
>?)
{
if
(
null
==
data
)
{
if
(
bannerList
.
isEmpty
())
{
bannerList
.
add
(
"https://h2.yidianling.com/ct/list"
)
}
}
if
(
null
!=
data
&&
data
.
isNotEmpty
())
{
bannerList
.
clear
()
for
(
item
in
data
)
{
bannerList
.
add
(
item
.
image
!!
)
}
}
banner_search
.
setOnBannerListener
{
if
(
null
==
data
||
data
.
isEmpty
())
{
TempH5RouteUtils
.
tempH5Route
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
"https://h2.yidianling.com/ct/list"
),
""
)
}
else
{
if
(
it
<
data
.
size
)
{
TempH5RouteUtils
.
tempH5Route
(
data
[
it
].
linkUrl
)
}
}
}
banner_search
.
setImageLoader
(
GlideImageLoader
(
R
.
drawable
.
consultant_expert_banner_default
)).
setImages
(
bannerList
).
start
()
banner_search
.
setIndicatorBottomPadding
(
20
)
}
override
fun
onNewIntent
(
intent
:
Intent
?)
{
override
fun
onNewIntent
(
intent
:
Intent
?)
{
super
.
onNewIntent
(
intent
)
super
.
onNewIntent
(
intent
)
initData
(
intent
!!
)
initData
(
intent
!!
)
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
c2c21df2
...
@@ -24,17 +24,14 @@ import com.ydl.webview.NewH5Activity
...
@@ -24,17 +24,14 @@ import com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import
com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.base.BaseMvpFragment
import
com.ydl.ydlcommon.base.BaseMvpFragment
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.ui.LogoLoadingView
import
com.ydl.ydlcommon.ui.LogoLoadingView
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.DisplayUtils
import
com.ydl.ydlcommon.utils.DisplayUtils
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.ydl.ydlcommon.view.banner.GlideImageLoader
import
com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import
com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.common.tools.RxDeviceTool
...
@@ -47,7 +44,6 @@ import com.yidianling.consultant.listener.OnFilterConfirmListener
...
@@ -47,7 +44,6 @@ import com.yidianling.consultant.listener.OnFilterConfirmListener
import
com.yidianling.consultant.listener.OnSortItemSelectedListener
import
com.yidianling.consultant.listener.OnSortItemSelectedListener
import
com.yidianling.consultant.model.bean.*
import
com.yidianling.consultant.model.bean.*
import
com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
import
com.yidianling.consultant.modular.singlton.ConsultAssistantDialogUtils
import
com.yidianling.consultant.modular.utils.TempH5RouteUtils
import
com.yidianling.consultant.router.ConsultantIn
import
com.yidianling.consultant.router.ConsultantIn
import
com.yidianling.consultant.ui.view.AreaPopupWindow
import
com.yidianling.consultant.ui.view.AreaPopupWindow
import
com.yidianling.consultant.ui.view.CategoryPopupWindow
import
com.yidianling.consultant.ui.view.CategoryPopupWindow
...
@@ -56,7 +52,6 @@ import com.yidianling.consultant.ui.view.SortPopupWindow
...
@@ -56,7 +52,6 @@ import com.yidianling.consultant.ui.view.SortPopupWindow
import
kotlinx.android.synthetic.main.consultant_activity_expert_search_list.*
import
kotlinx.android.synthetic.main.consultant_activity_expert_search_list.*
import
kotlinx.android.synthetic.main.consultant_item_filter_online.view.*
import
kotlinx.android.synthetic.main.consultant_item_filter_online.view.*
import
kotlinx.android.synthetic.main.consultant_layout_search_content.*
import
kotlinx.android.synthetic.main.consultant_layout_search_content.*
import
kotlinx.android.synthetic.main.consultant_layout_search_head_bg.*
import
kotlinx.android.synthetic.main.consultant_layout_search_toolbar.*
import
kotlinx.android.synthetic.main.consultant_layout_search_toolbar.*
import
org.json.JSONObject
import
org.json.JSONObject
import
java.util.concurrent.Executors
import
java.util.concurrent.Executors
...
@@ -323,8 +318,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
...
@@ -323,8 +318,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
getPresenter
().
fetchListHead
()
getPresenter
().
fetchListHead
()
//加载本地缓存数据
//加载本地缓存数据
getPresenter
().
localData
(
initShowType
)
getPresenter
().
localData
(
initShowType
)
//加载banner
getPresenter
().
fetchBannerList
()
//refresh(false)
//refresh(false)
v_loading
.
visibility
=
View
.
VISIBLE
v_loading
.
visibility
=
View
.
VISIBLE
...
@@ -335,35 +328,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
...
@@ -335,35 +328,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
}
}
}
}
override
fun
onBannerListFetched
(
data
:
MutableList
<
ExpertBannerBean
>?)
{
if
(
null
==
data
)
{
if
(
bannerList
.
isEmpty
())
{
bannerList
.
add
(
"https://h2.yidianling.com/ct/list"
)
}
}
if
(
null
!=
data
&&
data
.
isNotEmpty
())
{
bannerList
.
clear
()
for
(
item
in
data
)
{
bannerList
.
add
(
item
.
image
!!
)
}
}
banner_search
.
setOnBannerListener
{
if
(
null
==
data
||
data
.
isEmpty
())
{
TempH5RouteUtils
.
tempH5Route
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
"https://h2.yidianling.com/ct/list"
),
""
)
}
else
{
if
(
it
<
data
.
size
)
{
TempH5RouteUtils
.
tempH5Route
(
data
[
it
].
linkUrl
)
}
}
}
banner_search
.
setImageLoader
(
GlideImageLoader
(
R
.
drawable
.
consultant_expert_banner_default
)).
setImages
(
bannerList
).
start
()
banner_search
.
setIndicatorBottomPadding
(
20
)
}
/**
/**
* 初始化状态栏位置
* 初始化状态栏位置
*/
*/
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchPresenter.kt
View file @
c2c21df2
...
@@ -42,26 +42,6 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
...
@@ -42,26 +42,6 @@ class ExpertSearchPresenter : SimplePresenter<IExpertSearchView>() {
})
})
}
}
@SuppressLint
(
"CheckResult"
)
fun
fetchBannerList
()
{
ExpertSearchDataManager
.
getHttp
().
getBannerList
()
.
subscribeOn
(
Schedulers
.
io
())
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mView
!!
))
.
compose
(
RxUtils
.
resultJavaData
())
.
map
{
it
}
.
filter
{
it
!=
null
}
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
mView
.
onBannerListFetched
(
it
)
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
mView
.
onBannerListFetched
(
null
)
// mView.fetchFailed(msg)
}
})
}
/**
/**
* 加载缓存
* 加载缓存
*/
*/
...
...
m-consultant/src/main/java/com/yidianling/consultant/IExpertSearchView.kt
View file @
c2c21df2
...
@@ -23,7 +23,6 @@ interface IExpertSearchView : IView {
...
@@ -23,7 +23,6 @@ interface IExpertSearchView : IView {
fun
fetchFailed
(
msg
:
String
?)
fun
fetchFailed
(
msg
:
String
?)
fun
fetchListFailed
(
msg
:
String
?)
fun
fetchListFailed
(
msg
:
String
?)
fun
fetchListEmpty
(
msg
:
String
?)
fun
fetchListEmpty
(
msg
:
String
?)
fun
onBannerListFetched
(
data
:
MutableList
<
ExpertBannerBean
>?)
/**
/**
* 加载图片
* 加载图片
*/
*/
...
...
m-consultant/src/main/java/com/yidianling/consultant/bean/ExpertSearchBigShotBean.java
0 → 100644
View file @
c2c21df2
package
com
.
yidianling
.
consultant
.
bean
;
import
java.util.List
;
public
class
ExpertSearchBigShotBean
{
/**
* id : 62
* specialTopicName : 1
* specialTopicType : 2
* specialTopicTitle : 大咖专场1
* specialTopicSubhead : 副标题1
* status : 0
* weight : 2
* jumpWay : 2
* createTime : Dec 13, 2019 9:56:26 PM
* updateTime : Dec 16, 2019 5:05:36 PM
* createrId : 22
* specialTopicUrl : https://testh2.yidianling.com/post/view-out/139?last_source=app
* topicImages : [{"id":88,"parentId":62,"iamgeType":2,"isShow":1,"createTime":"Dec 13, 2019 9:35:45 PM","updateTime":"Dec 16, 2019 4:31:42 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":133,"parentId":62,"iamgeType":1,"isShow":1,"createTime":"Dec 16, 2019 4:23:00 PM","updateTime":"Dec 16, 2019 4:34:48 PM","createrId":0,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":134,"parentId":62,"iamgeType":1,"isShow":1,"createTime":"Dec 16, 2019 4:28:03 PM","updateTime":"Dec 16, 2019 4:29:58 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":146,"parentId":62,"iamgeType":3,"isShow":1,"createTime":"Dec 16, 2019 4:32:15 PM","updateTime":"Dec 16, 2019 4:34:01 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"}]
*/
private
int
id
;
private
String
specialTopicName
;
private
int
specialTopicType
;
private
String
specialTopicTitle
;
private
String
specialTopicSubhead
;
private
int
status
;
private
int
weight
;
private
int
jumpWay
;
private
String
createTime
;
private
String
updateTime
;
private
int
createrId
;
private
String
specialTopicUrl
;
private
List
<
TopicImagesBean
>
topicImages
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getSpecialTopicName
()
{
return
specialTopicName
;
}
public
void
setSpecialTopicName
(
String
specialTopicName
)
{
this
.
specialTopicName
=
specialTopicName
;
}
public
int
getSpecialTopicType
()
{
return
specialTopicType
;
}
public
void
setSpecialTopicType
(
int
specialTopicType
)
{
this
.
specialTopicType
=
specialTopicType
;
}
public
String
getSpecialTopicTitle
()
{
return
specialTopicTitle
;
}
public
void
setSpecialTopicTitle
(
String
specialTopicTitle
)
{
this
.
specialTopicTitle
=
specialTopicTitle
;
}
public
String
getSpecialTopicSubhead
()
{
return
specialTopicSubhead
;
}
public
void
setSpecialTopicSubhead
(
String
specialTopicSubhead
)
{
this
.
specialTopicSubhead
=
specialTopicSubhead
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
int
getWeight
()
{
return
weight
;
}
public
void
setWeight
(
int
weight
)
{
this
.
weight
=
weight
;
}
public
int
getJumpWay
()
{
return
jumpWay
;
}
public
void
setJumpWay
(
int
jumpWay
)
{
this
.
jumpWay
=
jumpWay
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
int
getCreaterId
()
{
return
createrId
;
}
public
void
setCreaterId
(
int
createrId
)
{
this
.
createrId
=
createrId
;
}
public
String
getSpecialTopicUrl
()
{
return
specialTopicUrl
;
}
public
void
setSpecialTopicUrl
(
String
specialTopicUrl
)
{
this
.
specialTopicUrl
=
specialTopicUrl
;
}
public
List
<
TopicImagesBean
>
getTopicImages
()
{
return
topicImages
;
}
public
void
setTopicImages
(
List
<
TopicImagesBean
>
topicImages
)
{
this
.
topicImages
=
topicImages
;
}
public
static
class
TopicImagesBean
{
/**
* id : 88
* parentId : 62
* iamgeType : 2
* isShow : 1
* createTime : Dec 13, 2019 9:35:45 PM
* updateTime : Dec 16, 2019 4:31:42 PM
* createrId : 1
* imageUrl : https://pic.ydlcdn.com/6n5AcChhYa.png
*/
private
int
id
;
private
int
parentId
;
private
int
iamgeType
;
private
int
isShow
;
private
String
createTime
;
private
String
updateTime
;
private
int
createrId
;
private
String
imageUrl
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
int
parentId
)
{
this
.
parentId
=
parentId
;
}
public
int
getIamgeType
()
{
return
iamgeType
;
}
public
void
setIamgeType
(
int
iamgeType
)
{
this
.
iamgeType
=
iamgeType
;
}
public
int
getIsShow
()
{
return
isShow
;
}
public
void
setIsShow
(
int
isShow
)
{
this
.
isShow
=
isShow
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
int
getCreaterId
()
{
return
createrId
;
}
public
void
setCreaterId
(
int
createrId
)
{
this
.
createrId
=
createrId
;
}
public
String
getImageUrl
()
{
return
imageUrl
;
}
public
void
setImageUrl
(
String
imageUrl
)
{
this
.
imageUrl
=
imageUrl
;
}
}
}
m-consultant/src/main/java/com/yidianling/consultant/bean/ExpertSearchRecommandBean.java
0 → 100644
View file @
c2c21df2
package
com
.
yidianling
.
consultant
.
bean
;
import
java.util.List
;
public
class
ExpertSearchRecommandBean
{
/**
* id : 68
* specialTopicName : 3
* specialTopicType : 1
* specialTopicTitle : 婚姻幸福
* specialTopicSubhead : 副标题副标题1
* status : 0
* weight : 1
* jumpWay : 1
* createTime : Dec 13, 2019 9:35:47 PM
* updateTime : Dec 16, 2019 5:44:47 PM
* createrId : 11
* specialTopicUrl : https://testh2.yidianling.com/post/view-out/139?last_source=app
* topicImages : [{"id":103,"parentId":68,"iamgeType":2,"isShow":1,"createTime":"Dec 13, 2019 9:35:47 PM","updateTime":"Dec 16, 2019 4:31:55 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":140,"parentId":68,"iamgeType":1,"isShow":1,"createTime":"Dec 16, 2019 4:28:05 PM","updateTime":"Dec 16, 2019 4:30:13 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"},{"id":152,"parentId":68,"iamgeType":3,"isShow":1,"createTime":"Dec 16, 2019 4:32:18 PM","updateTime":"Dec 16, 2019 4:34:15 PM","createrId":1,"imageUrl":"https://pic.ydlcdn.com/6n5AcChhYa.png"}]
*/
private
int
id
;
private
String
specialTopicName
;
private
int
specialTopicType
;
private
String
specialTopicTitle
;
private
String
specialTopicSubhead
;
private
int
status
;
private
int
weight
;
private
int
jumpWay
;
private
String
createTime
;
private
String
updateTime
;
private
int
createrId
;
private
String
specialTopicUrl
;
private
List
<
TopicImagesBean
>
topicImages
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getSpecialTopicName
()
{
return
specialTopicName
;
}
public
void
setSpecialTopicName
(
String
specialTopicName
)
{
this
.
specialTopicName
=
specialTopicName
;
}
public
int
getSpecialTopicType
()
{
return
specialTopicType
;
}
public
void
setSpecialTopicType
(
int
specialTopicType
)
{
this
.
specialTopicType
=
specialTopicType
;
}
public
String
getSpecialTopicTitle
()
{
return
specialTopicTitle
;
}
public
void
setSpecialTopicTitle
(
String
specialTopicTitle
)
{
this
.
specialTopicTitle
=
specialTopicTitle
;
}
public
String
getSpecialTopicSubhead
()
{
return
specialTopicSubhead
;
}
public
void
setSpecialTopicSubhead
(
String
specialTopicSubhead
)
{
this
.
specialTopicSubhead
=
specialTopicSubhead
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
int
getWeight
()
{
return
weight
;
}
public
void
setWeight
(
int
weight
)
{
this
.
weight
=
weight
;
}
public
int
getJumpWay
()
{
return
jumpWay
;
}
public
void
setJumpWay
(
int
jumpWay
)
{
this
.
jumpWay
=
jumpWay
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
int
getCreaterId
()
{
return
createrId
;
}
public
void
setCreaterId
(
int
createrId
)
{
this
.
createrId
=
createrId
;
}
public
String
getSpecialTopicUrl
()
{
return
specialTopicUrl
;
}
public
void
setSpecialTopicUrl
(
String
specialTopicUrl
)
{
this
.
specialTopicUrl
=
specialTopicUrl
;
}
public
List
<
TopicImagesBean
>
getTopicImages
()
{
return
topicImages
;
}
public
void
setTopicImages
(
List
<
TopicImagesBean
>
topicImages
)
{
this
.
topicImages
=
topicImages
;
}
public
static
class
TopicImagesBean
{
/**
* id : 103
* parentId : 68
* iamgeType : 2
* isShow : 1
* createTime : Dec 13, 2019 9:35:47 PM
* updateTime : Dec 16, 2019 4:31:55 PM
* createrId : 1
* imageUrl : https://pic.ydlcdn.com/6n5AcChhYa.png
*/
private
int
id
;
private
int
parentId
;
private
int
iamgeType
;
private
int
isShow
;
private
String
createTime
;
private
String
updateTime
;
private
int
createrId
;
private
String
imageUrl
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
int
parentId
)
{
this
.
parentId
=
parentId
;
}
public
int
getIamgeType
()
{
return
iamgeType
;
}
public
void
setIamgeType
(
int
iamgeType
)
{
this
.
iamgeType
=
iamgeType
;
}
public
int
getIsShow
()
{
return
isShow
;
}
public
void
setIsShow
(
int
isShow
)
{
this
.
isShow
=
isShow
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
int
getCreaterId
()
{
return
createrId
;
}
public
void
setCreaterId
(
int
createrId
)
{
this
.
createrId
=
createrId
;
}
public
String
getImageUrl
()
{
return
imageUrl
;
}
public
void
setImageUrl
(
String
imageUrl
)
{
this
.
imageUrl
=
imageUrl
;
}
}
}
m-consultant/src/main/java/com/yidianling/consultant/bean/ExpertSearchTopShowBean.kt
0 → 100644
View file @
c2c21df2
package
com.yidianling.consultant.bean
class
ExpertSearchTopShowBean
(
var
doctorSpecialTopics
:
ArrayList
<
ExpertSearchBigShotBean
>,
var
sceneSpecialTopic
:
ArrayList
<
ExpertSearchRecommandBean
>
)
m-consultant/src/main/java/com/yidianling/consultant/http/ExpertSearchHttpImpl.kt
View file @
c2c21df2
...
@@ -3,6 +3,7 @@ package com.yidianling.consultant.http
...
@@ -3,6 +3,7 @@ package com.yidianling.consultant.http
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlnet.YDLHttpUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.consultant.bean.ExpertSearchTopShowBean
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.model.SearchApi
import
com.yidianling.consultant.model.bean.ExpertBannerBean
import
com.yidianling.consultant.model.bean.ExpertBannerBean
import
com.yidianling.consultant.model.bean.ExpertSearchBean
import
com.yidianling.consultant.model.bean.ExpertSearchBean
...
@@ -49,8 +50,8 @@ class ExpertSearchHttpImpl : IExpertSearchHttp {
...
@@ -49,8 +50,8 @@ class ExpertSearchHttpImpl : IExpertSearchHttp {
}
}
override
fun
getB
annerList
():
Observable
<
BaseAPIResponse
<
MutableList
<
ExpertBannerBean
>
>>
{
override
fun
getB
igShotData
():
Observable
<
BaseAPIResponse
<
ExpertSearchTopShowBean
>>
{
return
getSearchApi
().
expertBannerList
()
return
getSearchApi
().
getBigShotData
()
}
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/http/IExpertSearchHttp.kt
View file @
c2c21df2
package
com.yidianling.consultant.http
package
com.yidianling.consultant.http
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.yidianling.consultant.bean.ExpertSearchTopShowBean
import
com.yidianling.consultant.model.bean.ExpertBannerBean
import
com.yidianling.consultant.model.bean.ExpertBannerBean
import
com.yidianling.consultant.model.bean.ExpertSearchBean
import
com.yidianling.consultant.model.bean.ExpertSearchBean
import
io.reactivex.Observable
import
io.reactivex.Observable
...
@@ -19,12 +20,13 @@ interface IExpertSearchHttp{
...
@@ -19,12 +20,13 @@ interface IExpertSearchHttp{
fun
searchDoctor
(
params
:
String
?):
Observable
<
BaseAPIResponse
<
ExpertSearchBean
>>
fun
searchDoctor
(
params
:
String
?):
Observable
<
BaseAPIResponse
<
ExpertSearchBean
>>
/**
/**
*
专家首页banner
*
获取当前筛选条件结果数
*/
*/
fun
get
BannerList
():
Observable
<
BaseAPIResponse
<
MutableList
<
ExpertBannerBean
>
>>
fun
get
FilterCount
(
params
:
String
?):
Observable
<
BaseAPIResponse
<
Int
>>
/**
/**
* 获取
当前筛选条件结果数
* 获取
大咖专区和顶部推荐数据数据
*/
*/
fun
getFilterCount
(
params
:
String
?):
Observable
<
BaseAPIResponse
<
Int
>>
fun
getBigShotData
():
Observable
<
BaseAPIResponse
<
ExpertSearchTopShowBean
>>
}
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/model/SearchApi.kt
View file @
c2c21df2
...
@@ -6,6 +6,7 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
...
@@ -6,6 +6,7 @@ import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseAPIResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlcommon.data.http.BaseResponse
import
com.ydl.ydlnet.YDLHttpUtils
import
com.ydl.ydlnet.YDLHttpUtils
import
com.yidianling.consultant.bean.ExpertSearchTopShowBean
import
com.yidianling.consultant.bean.HotSearchBean
import
com.yidianling.consultant.bean.HotSearchBean
import
com.yidianling.consultant.model.bean.ExpertBannerBean
import
com.yidianling.consultant.model.bean.ExpertBannerBean
import
com.yidianling.consultant.model.bean.ExpertSearchBean
import
com.yidianling.consultant.model.bean.ExpertSearchBean
...
@@ -46,11 +47,6 @@ interface SearchApi {
...
@@ -46,11 +47,6 @@ interface SearchApi {
@GET
@GET
fun
searchDoctorService
(
@Url
url
:
String
):
Observable
<
BaseAPIResponse
<
ExpertSearchBean
>>
fun
searchDoctorService
(
@Url
url
:
String
):
Observable
<
BaseAPIResponse
<
ExpertSearchBean
>>
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"delivery/banner"
)
fun
expertBannerList
(
@Query
(
value
=
"planId"
)
planId
:
String
?=
"32"
):
Observable
<
BaseAPIResponse
<
MutableList
<
ExpertBannerBean
>>>
//搜索页面接口
//搜索页面接口
@retrofit2
.
http
.
Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@retrofit2
.
http
.
Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"home/search-page"
)
@GET
(
"home/search-page"
)
...
@@ -70,4 +66,9 @@ interface SearchApi {
...
@@ -70,4 +66,9 @@ interface SearchApi {
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@GET
(
"consult/assistant/chat-distribute"
)
@GET
(
"consult/assistant/chat-distribute"
)
fun
getConsultAssistantUidRequest
():
Observable
<
BaseAPIResponse
<
Long
>>
fun
getConsultAssistantUidRequest
():
Observable
<
BaseAPIResponse
<
Long
>>
//获取咨询助理uid
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
@POST
(
"doctor/querySpecialTopic"
)
fun
getBigShotData
():
Observable
<
BaseAPIResponse
<
ExpertSearchTopShowBean
>>
}
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/BigShotOneView.kt
0 → 100644
View file @
c2c21df2
package
com.yidianling.consultant.ui.view.topView
import
android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.module.GlideApp
import
com.yidianling.consultant.R
import
com.yidianling.consultant.bean.ExpertSearchBigShotBean
import
kotlinx.android.synthetic.main.consultant_expert_search_big_shot_one.view.*
class
BigShotOneView
:
LinearLayout
{
constructor
(
context
:
Context
)
:
super
(
context
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
)
:
super
(
context
,
attrs
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
,
defStyle
:
Int
)
:
super
(
context
,
attrs
,
defStyle
)
{
mContext
=
context
initView
()
}
private
var
mContext
:
Context
?
=
null
private
fun
initView
()
{
layoutParams
=
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
orientation
=
HORIZONTAL
View
.
inflate
(
mContext
,
R
.
layout
.
consultant_expert_search_big_shot_one
,
this
)
}
fun
setUrl
(
bean
:
ExpertSearchBigShotBean
)
{
GlideApp
.
with
(
mContext
).
load
(
bean
.
topicImages
[
0
]).
into
(
consultant_one_img_1
)
consultant_one_img_1
.
setOnClickListener
{
val
h5Params
=
H5Params
(
bean
.
specialTopicUrl
,
null
)
NewH5Activity
.
start
(
context
,
h5Params
)
}
}
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/BigShotThreeView.kt
0 → 100644
View file @
c2c21df2
package
com.yidianling.consultant.ui.view.topView
import
android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.module.GlideApp
import
com.yidianling.consultant.R
import
com.yidianling.consultant.bean.ExpertSearchBigShotBean
import
kotlinx.android.synthetic.main.consultant_expert_search_big_shot_three.view.*
class
BigShotThreeView
:
LinearLayout
{
constructor
(
context
:
Context
)
:
super
(
context
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
)
:
super
(
context
,
attrs
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
,
defStyle
:
Int
)
:
super
(
context
,
attrs
,
defStyle
)
{
mContext
=
context
initView
()
}
private
var
mContext
:
Context
?
=
null
private
fun
initView
()
{
layoutParams
=
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
orientation
=
HORIZONTAL
View
.
inflate
(
mContext
,
R
.
layout
.
consultant_expert_search_big_shot_three
,
this
)
}
fun
setUrl
(
bean1
:
ExpertSearchBigShotBean
,
bean2
:
ExpertSearchBigShotBean
,
bean3
:
ExpertSearchBigShotBean
)
{
GlideApp
.
with
(
mContext
).
load
(
bean1
.
topicImages
[
2
].
imageUrl
).
into
(
consultant_three_img_1
)
consultant_three_img_1
.
setOnClickListener
{
val
h5Params
=
H5Params
(
bean1
.
specialTopicUrl
,
null
)
NewH5Activity
.
start
(
context
,
h5Params
)
}
GlideApp
.
with
(
mContext
).
load
(
bean2
.
topicImages
[
2
].
imageUrl
).
into
(
consultant_three_img_2
)
consultant_three_img_2
.
setOnClickListener
{
val
h5Params
=
H5Params
(
bean2
.
specialTopicUrl
,
null
)
NewH5Activity
.
start
(
context
,
h5Params
)
}
GlideApp
.
with
(
mContext
).
load
(
bean3
.
topicImages
[
2
].
imageUrl
).
into
(
consultant_three_img_3
)
consultant_three_img_3
.
setOnClickListener
{
val
h5Params
=
H5Params
(
bean3
.
specialTopicUrl
,
null
)
NewH5Activity
.
start
(
context
,
h5Params
)
}
}
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/BigShotTwoView.kt
0 → 100644
View file @
c2c21df2
package
com.yidianling.consultant.ui.view.topView
import
android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.module.GlideApp
import
com.yidianling.consultant.R
import
com.yidianling.consultant.bean.ExpertSearchBigShotBean
import
kotlinx.android.synthetic.main.consultant_expert_search_big_shot_two.view.*
class
BigShotTwoView
:
LinearLayout
{
constructor
(
context
:
Context
)
:
super
(
context
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
)
:
super
(
context
,
attrs
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
,
defStyle
:
Int
)
:
super
(
context
,
attrs
,
defStyle
)
{
mContext
=
context
initView
()
}
private
var
mContext
:
Context
?
=
null
private
fun
initView
()
{
layoutParams
=
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
orientation
=
HORIZONTAL
View
.
inflate
(
mContext
,
R
.
layout
.
consultant_expert_search_big_shot_two
,
this
)
}
fun
setUrl
(
bean1
:
ExpertSearchBigShotBean
,
bean2
:
ExpertSearchBigShotBean
)
{
GlideApp
.
with
(
mContext
).
load
(
bean1
.
topicImages
[
1
].
imageUrl
).
into
(
consultant_two_img_1
)
consultant_two_img_1
.
setOnClickListener
{
val
h5Params
=
H5Params
(
bean1
.
specialTopicUrl
,
null
)
NewH5Activity
.
start
(
context
,
h5Params
)
}
GlideApp
.
with
(
mContext
).
load
(
bean2
.
topicImages
[
1
].
imageUrl
).
into
(
consultant_two_img_2
)
consultant_two_img_2
.
setOnClickListener
{
val
h5Params
=
H5Params
(
bean2
.
specialTopicUrl
,
null
)
NewH5Activity
.
start
(
context
,
h5Params
)
}
}
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/RecommendItemView.kt
0 → 100644
View file @
c2c21df2
package
com.yidianling.consultant.ui.view.topView
import
android.content.Context
import
android.util.AttributeSet
import
android.view.View
import
android.widget.LinearLayout
import
com.alibaba.android.arouter.launcher.ARouter
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.yidianling.common.tools.RxDeviceTool
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.consultant.R
import
com.yidianling.consultant.bean.ExpertSearchRecommandBean
import
kotlinx.android.synthetic.main.consultant_expert_search_top_item_view.view.*
import
java.net.URLDecoder
class
RecommendItemView
:
LinearLayout
{
constructor
(
context
:
Context
)
:
super
(
context
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
)
:
super
(
context
,
attrs
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
,
defStyle
:
Int
)
:
super
(
context
,
attrs
,
defStyle
)
{
mContext
=
context
initView
()
}
private
var
mContext
:
Context
?
=
null
private
fun
initView
()
{
val
mWidth
:
Int
=
RxDeviceTool
.
getScreenWidth
(
mContext
)
/
2
val
mHeight
:
Int
=
RxImageTool
.
dp2px
(
60f
)
val
params
=
LayoutParams
(
mWidth
,
mHeight
)
params
.
height
=
mHeight
layoutParams
=
params
orientation
=
HORIZONTAL
setPadding
(
RxImageTool
.
dp2px
(
15f
),
RxImageTool
.
dp2px
(
9f
),
0
,
RxImageTool
.
dp2px
(
11f
))
View
.
inflate
(
mContext
,
R
.
layout
.
consultant_expert_search_top_item_view
,
this
)
}
fun
setData
(
bean
:
ExpertSearchRecommandBean
)
{
if
(
bean
.
topicImages
.
isNotEmpty
()
&&
bean
.
topicImages
.
size
>
0
&&
bean
.
topicImages
[
0
].
imageUrl
.
isNotEmpty
())
{
GlideApp
.
with
(
mContext
).
load
(
bean
.
topicImages
[
0
].
imageUrl
).
into
(
top_item_img
)
}
top_item_title
.
text
=
bean
.
specialTopicTitle
?:
""
top_item_desc
.
text
=
bean
.
specialTopicSubhead
?:
""
setOnClickListener
{
val
h5Params
=
H5Params
(
bean
.
specialTopicUrl
,
null
)
NewH5Activity
.
start
(
context
,
h5Params
)
}
}
}
\ No newline at end of file
m-consultant/src/main/java/com/yidianling/consultant/ui/view/topView/RecommendListView.kt
0 → 100644
View file @
c2c21df2
package
com.yidianling.consultant.ui.view.topView
import
android.annotation.SuppressLint
import
android.content.Context
import
android.support.v4.view.PagerAdapter
import
android.support.v4.view.ViewPager
import
android.util.AttributeSet
import
android.util.Log
import
android.view.View
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.utils.RxLifecycleUtils
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.R
import
com.yidianling.consultant.bean.ExpertSearchBigShotBean
import
com.yidianling.consultant.bean.ExpertSearchRecommandBean
import
com.yidianling.consultant.http.ExpertSearchHttpImpl
import
io.reactivex.Scheduler
import
io.reactivex.android.schedulers.AndroidSchedulers
import
io.reactivex.functions.Consumer
import
io.reactivex.schedulers.Schedulers
import
kotlinx.android.synthetic.main.consultant_expert_search_top_all_view.view.*
class
RecommendListView
:
LinearLayout
{
constructor
(
context
:
Context
)
:
super
(
context
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
)
:
super
(
context
,
attrs
)
{
mContext
=
context
initView
()
}
constructor
(
context
:
Context
,
attrs
:
AttributeSet
,
defStyle
:
Int
)
:
super
(
context
,
attrs
,
defStyle
)
{
mContext
=
context
initView
()
}
private
var
mContext
:
Context
?
=
null
private
var
mSceneSpecialTopicList
=
ArrayList
<
ExpertSearchRecommandBean
>()
// viewPager的所有item数据
private
var
mViewPagerList
=
ArrayList
<
LinearLayout
>()
//viewPager的数据
private
var
mDoctorSpecialTopicsList
=
ArrayList
<
ExpertSearchBigShotBean
>()
//viewPager的数据
private
var
minHeight
:
Int
=
0
// viewPager最小高度
private
var
maxHeight
:
Int
=
0
// viewPager最大高度
private
var
dp_15
:
Int
=
RxImageTool
.
dp2px
(
15f
)
private
var
dp_5
:
Int
=
RxImageTool
.
dp2px
(
5f
)
private
fun
initView
()
{
layoutParams
=
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
orientation
=
VERTICAL
View
.
inflate
(
mContext
,
R
.
layout
.
consultant_expert_search_top_all_view
,
this
)
requestData
()
}
@SuppressLint
(
"CheckResult"
)
fun
requestData
()
{
ExpertSearchHttpImpl
.
getInstance
().
getBigShotData
()
.
subscribeOn
(
Schedulers
.
io
())
.
compose
(
RxUtils
.
resultJavaData
())
.
map
{
it
}
.
filter
{
true
}
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
Consumer
{
mSceneSpecialTopicList
.
addAll
(
it
.
sceneSpecialTopic
)
mDoctorSpecialTopicsList
.
addAll
(
it
.
doctorSpecialTopics
)
setData
()
},
object
:
ThrowableConsumer
()
{
override
fun
accept
(
msg
:
String
)
{
ToastUtil
.
toastShort
(
msg
)
}
})
}
/**
* 设置数据
*/
fun
setData
()
{
// 顶部viewpager数据
if
(
mSceneSpecialTopicList
?.
isNotEmpty
()
!!
)
{
initMinHeight
(
mSceneSpecialTopicList
.
size
)
initViewPager
()
}
//多种不同类型大咖专区
if
(
mDoctorSpecialTopicsList
?.
isNotEmpty
()
!!
)
{
setBigShotViewData
()
}
}
private
fun
initViewPager
()
{
mContext
?.
let
{
/**
* 渲染第一页数据
*/
var
firstPagerHeight
=
RxImageTool
.
dp2px
(
60f
*
(
getMinData
(
mSceneSpecialTopicList
.
size
+
1
,
4
+
1
)
/
2
))
val
firstPager
=
getLinearLayout
(
mContext
!!
,
firstPagerHeight
,
VERTICAL
)
for
(
index
in
0
until
getMinData
(
mSceneSpecialTopicList
.
size
,
4
)
step
2
)
{
val
ll
=
getLinearLayout
(
mContext
!!
,
RxImageTool
.
dp2px
(
60f
),
HORIZONTAL
)
val
item
=
RecommendItemView
(
mContext
!!
)
item
.
setData
(
mSceneSpecialTopicList
[
index
])
ll
.
addView
(
item
)
if
(
index
+
1
<
mSceneSpecialTopicList
.
size
)
{
val
item1
=
RecommendItemView
(
mContext
!!
)
item1
.
setData
(
mSceneSpecialTopicList
[
index
])
ll
.
addView
(
item1
)
}
firstPager
.
addView
(
ll
)
}
mViewPagerList
.
add
(
firstPager
)
/**
* 渲染第二页数据
*/
var
secondPagerHeight
=
RxImageTool
.
dp2px
(
60f
*
((
mSceneSpecialTopicList
.
size
-
4
+
1
)
/
2
))
maxHeight
=
secondPagerHeight
+
RxImageTool
.
dp2px
(
11f
)
if
(
mSceneSpecialTopicList
.
size
>
4
)
{
val
secondPager
=
getLinearLayout
(
mContext
!!
,
secondPagerHeight
,
VERTICAL
)
for
(
index
in
4
until
mSceneSpecialTopicList
.
size
step
2
)
{
val
ll
=
getLinearLayout
(
mContext
!!
,
RxImageTool
.
dp2px
(
60f
),
HORIZONTAL
)
val
item
=
RecommendItemView
(
mContext
!!
)
item
.
setData
(
mSceneSpecialTopicList
[
index
])
ll
.
addView
(
item
)
if
(
index
+
1
<
mSceneSpecialTopicList
.
size
)
{
val
item1
=
RecommendItemView
(
mContext
!!
)
item1
.
setData
(
mSceneSpecialTopicList
[
index
])
ll
.
addView
(
item1
)
}
secondPager
.
addView
(
ll
)
}
mViewPagerList
.
add
(
secondPager
)
}
recommendViewPager
.
adapter
=
RecommendViewPagerAdapter
()
recommendViewPager
.
currentItem
=
0
setSelectedIndex
(
0
)
// 默认为左边选中
addListener
()
}
}
private
fun
addListener
()
{
recommendViewPager
.
addOnPageChangeListener
(
object
:
ViewPager
.
OnPageChangeListener
{
override
fun
onPageScrollStateChanged
(
state
:
Int
)
{
}
override
fun
onPageScrolled
(
position
:
Int
,
positionOffset
:
Float
,
positionOffsetPixels
:
Int
)
{
if
(
position
==
0
)
{
val
params
=
recommendViewPager
.
layoutParams
params
.
height
=
(
minHeight
+
(
maxHeight
-
minHeight
)
*
positionOffset
).
toInt
()
recommendViewPager
.
layoutParams
=
params
}
}
override
fun
onPageSelected
(
position
:
Int
)
{
setSelectedIndex
(
position
)
}
})
}
private
fun
setSelectedIndex
(
position
:
Int
)
{
if
(
position
==
0
)
{
leftIndicator
.
layoutParams
=
LayoutParams
(
dp_15
,
dp_5
)
val
marginParams
=
leftIndicator
.
layoutParams
as
MarginLayoutParams
marginParams
.
rightMargin
=
RxImageTool
.
dp2px
(
6f
)
leftIndicator
.
layoutParams
=
marginParams
leftIndicator
.
setBackgroundResource
(
R
.
drawable
.
consultant_indicator_selected
)
rightIndicator
.
layoutParams
=
LayoutParams
(
dp_5
,
dp_5
)
rightIndicator
.
setBackgroundResource
(
R
.
drawable
.
consultant_indicator_unselected
)
}
else
{
leftIndicator
.
layoutParams
=
LayoutParams
(
dp_5
,
dp_5
)
val
marginParams
=
leftIndicator
.
layoutParams
as
MarginLayoutParams
marginParams
.
rightMargin
=
RxImageTool
.
dp2px
(
6f
)
leftIndicator
.
layoutParams
=
marginParams
leftIndicator
.
setBackgroundResource
(
R
.
drawable
.
consultant_indicator_unselected
)
rightIndicator
.
layoutParams
=
LayoutParams
(
dp_15
,
dp_5
)
rightIndicator
.
setBackgroundResource
(
R
.
drawable
.
consultant_indicator_selected
)
}
}
private
fun
getMinData
(
a
:
Int
,
b
:
Int
):
Int
{
return
if
(
a
<
b
)
a
else
b
}
/**
* 初始化的高度为第一页的高度,与第二页的数据(无论有没有)没有关系
*/
private
fun
initMinHeight
(
size
:
Int
)
{
if
(
size
<
4
)
{
minHeight
=
RxImageTool
.
dp2px
(
11f
+
60f
*
((
mSceneSpecialTopicList
.
size
+
1
)
/
2
))
setViewPagerCustomHeight
(
minHeight
)
}
else
{
minHeight
=
RxImageTool
.
dp2px
(
11f
+
60f
*
((
4
+
1
)
/
2
))
setViewPagerCustomHeight
(
minHeight
)
}
}
/**
* 设置布局高度
*/
private
fun
setViewPagerCustomHeight
(
mHeight
:
Int
)
{
val
params
=
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
params
.
height
=
mHeight
recommendViewPager
.
layoutParams
=
params
}
private
fun
getLinearLayout
(
mContext
:
Context
,
mHeight
:
Int
,
mOrientation
:
Int
):
LinearLayout
{
val
params
=
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
mHeight
)
val
ll
=
LinearLayout
(
mContext
)
ll
.
layoutParams
=
params
ll
.
orientation
=
mOrientation
return
ll
}
internal
inner
class
RecommendViewPagerAdapter
:
PagerAdapter
()
{
override
fun
getCount
():
Int
{
return
mViewPagerList
.
size
}
override
fun
isViewFromObject
(
view
:
View
,
`object`
:
Any
):
Boolean
{
return
view
===
`object`
}
override
fun
instantiateItem
(
container
:
ViewGroup
,
position
:
Int
):
Any
{
val
view
=
mViewPagerList
[
position
]
container
.
addView
(
view
)
return
view
}
override
fun
destroyItem
(
container
:
ViewGroup
,
position
:
Int
,
`object`
:
Any
)
{
container
.
removeView
(
`object`
as
View
)
}
}
/**
* 设置大咖专区数据
*/
private
fun
setBigShotViewData
()
{
itemListView
.
layoutParams
=
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
mContext
?.
let
{
if
(
mDoctorSpecialTopicsList
.
isNotEmpty
())
{
when
{
mDoctorSpecialTopicsList
.
size
==
1
->
{
val
mView
=
BigShotOneView
(
mContext
!!
)
mView
.
setUrl
(
mDoctorSpecialTopicsList
[
0
])
itemListView
.
addView
(
mView
)
}
mDoctorSpecialTopicsList
.
size
==
2
->
{
val
mView
=
BigShotTwoView
(
mContext
!!
)
mView
.
setUrl
(
mDoctorSpecialTopicsList
[
0
],
mDoctorSpecialTopicsList
[
1
])
itemListView
.
addView
(
mView
)
}
mDoctorSpecialTopicsList
.
size
==
3
->
{
val
mView
=
BigShotThreeView
(
mContext
!!
)
mView
.
setUrl
(
mDoctorSpecialTopicsList
[
0
],
mDoctorSpecialTopicsList
[
1
],
mDoctorSpecialTopicsList
[
2
])
itemListView
.
addView
(
mView
)
}
mDoctorSpecialTopicsList
.
size
==
4
->
{
val
mView
=
BigShotTwoView
(
mContext
!!
)
val
params
=
mView
.
layoutParams
as
MarginLayoutParams
params
.
bottomMargin
=
RxImageTool
.
dp2px
(
10f
)
mView
.
layoutParams
=
params
val
mView1
=
BigShotTwoView
(
mContext
!!
)
mView
.
setUrl
(
mDoctorSpecialTopicsList
[
0
],
mDoctorSpecialTopicsList
[
1
])
mView1
.
setUrl
(
mDoctorSpecialTopicsList
[
2
],
mDoctorSpecialTopicsList
[
3
])
itemListView
.
addView
(
mView
)
itemListView
.
addView
(
mView1
)
}
mDoctorSpecialTopicsList
.
size
==
5
->
{
val
mView
=
BigShotThreeView
(
mContext
!!
)
val
params
=
mView
.
layoutParams
as
MarginLayoutParams
params
.
bottomMargin
=
RxImageTool
.
dp2px
(
10f
)
mView
.
layoutParams
=
params
val
mView1
=
BigShotTwoView
(
mContext
!!
)
mView
.
setUrl
(
mDoctorSpecialTopicsList
[
0
],
mDoctorSpecialTopicsList
[
1
],
mDoctorSpecialTopicsList
[
2
])
mView1
.
setUrl
(
mDoctorSpecialTopicsList
[
3
],
mDoctorSpecialTopicsList
[
3
])
itemListView
.
addView
(
mView
)
itemListView
.
addView
(
mView1
)
}
mDoctorSpecialTopicsList
.
size
==
6
->
{
val
mView
=
BigShotThreeView
(
mContext
!!
)
val
params
=
mView
.
layoutParams
as
MarginLayoutParams
params
.
bottomMargin
=
RxImageTool
.
dp2px
(
10f
)
mView
.
layoutParams
=
params
val
mView1
=
BigShotThreeView
(
mContext
!!
)
mView
.
setUrl
(
mDoctorSpecialTopicsList
[
0
],
mDoctorSpecialTopicsList
[
1
],
mDoctorSpecialTopicsList
[
2
])
mView1
.
setUrl
(
mDoctorSpecialTopicsList
[
3
],
mDoctorSpecialTopicsList
[
4
],
mDoctorSpecialTopicsList
[
5
])
itemListView
.
addView
(
mView
)
itemListView
.
addView
(
mView1
)
}
}
}
}
}
}
\ No newline at end of file
m-consultant/src/main/res/drawable/consultant_indicator_selected.xml
0 → 100644
View file @
c2c21df2
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<size
android:height=
"5dp"
android:width=
"15dp"
/>
<corners
android:radius=
"2.5dp"
/>
<solid
android:color=
"#000000"
/>
</shape>
\ No newline at end of file
m-consultant/src/main/res/drawable/consultant_indicator_unselected.xml
0 → 100644
View file @
c2c21df2
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<size
android:height=
"5dp"
android:width=
"5dp"
/>
<corners
android:radius=
"2.5dp"
/>
<solid
android:color=
"#dddddd"
/>
</shape>
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_activity_expert_search_list.xml
View file @
c2c21df2
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:background=
"@color/white"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<include
<include
layout=
"@layout/consultant_layout_search_toolbar"
layout=
"@layout/consultant_layout_search_toolbar"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
/>
android:layout_height=
"48dp"
/>
<android.support.design.widget.CoordinatorLayout
<android.support.design.widget.CoordinatorLayout
android:id=
"@+id/container"
android:id=
"@+id/container"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/consultant_colorBg"
android:background=
"@color/consultant_colorBg"
tools:ignore=
"InefficientWeight"
>
tools:ignore=
"InefficientWeight"
>
<android.support.design.widget.AppBarLayout
<android.support.design.widget.AppBarLayout
android:id=
"@+id/appbar_layout"
android:id=
"@+id/appbar_layout"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/consultant_colorBg"
android:background=
"@color/consultant_colorBg"
android:clipChildren=
"false"
android:clipChildren=
"false"
android:clipToPadding=
"false"
android:clipToPadding=
"false"
android:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:elevation=
"0dp"
>
app:elevation=
"0dp"
>
<android.support.design.widget.CollapsingToolbarLayout
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:clipChildren=
"false"
android:clipChildren=
"false"
android:clipToPadding=
"false"
android:clipToPadding=
"false"
app:layout_scrollFlags=
"scroll|exitUntilCollapsed"
>
app:layout_scrollFlags=
"scroll|exitUntilCollapsed"
>
<include
layout=
"@layout/consultant_layout_search_head_bg"
/>
<com.yidianling.consultant.ui.view.topView.RecommendListView
android:id=
"@+id/recommendListView"
android:layout_width=
"match_parent"
</android.support.design.widget.CollapsingToolbarLayout>
android:layout_height=
"wrap_content"
>
</android.support.design.widget.AppBarLayout>
</com.yidianling.consultant.ui.view.topView.RecommendListView>
<include
layout=
"@layout/consultant_layout_search_content"
/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<!--<include layout="@layout/layout_search_head_input"/>-->
<include
layout=
"@layout/consultant_layout_search_content"
/>
<!--筛选弹窗半透明背景-->
<View
<!--<include layout="@layout/layout_search_head_input"/>-->
android:id=
"@+id/viewDim_filter"
android:layout_width=
"match_parent"
<!--筛选弹窗半透明背景-->
android:layout_height=
"match_parent"
<View
android:background=
"#40000000"
android:id=
"@+id/viewDim_filter"
android:visibility=
"gone"
/>
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
</android.support.design.widget.CoordinatorLayout>
android:background=
"#40000000"
</LinearLayout>
android:visibility=
"gone"
/>
</android.support.design.widget.CoordinatorLayout>
</LinearLayout>
m-consultant/src/main/res/layout/consultant_expert_search_big_shot_one.xml
0 → 100644
View file @
c2c21df2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"84dp"
android:orientation=
"vertical"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<android.support.v7.widget.CardView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:cardElevation=
"0dp"
app:cardCornerRadius=
"6dp"
>
<ImageView
android:id=
"@+id/consultant_one_img_1"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
android:background=
"#eeeeee"
/>
</android.support.v7.widget.CardView>
</LinearLayout>
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_expert_search_big_shot_three.xml
0 → 100644
View file @
c2c21df2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"84dp"
android:orientation=
"horizontal"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<android.support.v7.widget.CardView
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
app:cardElevation=
"0dp"
app:cardCornerRadius=
"6dp"
android:layout_marginRight=
"5dp"
>
<ImageView
android:id=
"@+id/consultant_three_img_1"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
android:background=
"#eeeeee"
/>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
app:cardElevation=
"0dp"
app:cardCornerRadius=
"6dp"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
>
<ImageView
android:id=
"@+id/consultant_three_img_2"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
android:background=
"#eeeeee"
/>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
app:cardElevation=
"0dp"
app:cardCornerRadius=
"6dp"
android:layout_marginLeft=
"5dp"
>
<ImageView
android:id=
"@+id/consultant_three_img_3"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
android:background=
"#eeeeee"
/>
</android.support.v7.widget.CardView>
</LinearLayout>
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_expert_search_big_shot_two.xml
0 → 100644
View file @
c2c21df2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"84dp"
android:orientation=
"horizontal"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<android.support.v7.widget.CardView
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
app:cardElevation=
"0dp"
app:cardCornerRadius=
"6dp"
android:layout_marginRight=
"5dp"
>
<ImageView
android:id=
"@+id/consultant_two_img_1"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
android:background=
"#eeeeee"
/>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
app:cardElevation=
"0dp"
app:cardCornerRadius=
"6dp"
android:layout_marginLeft=
"5dp"
>
<ImageView
android:id=
"@+id/consultant_two_img_2"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
android:background=
"#eeeeee"
/>
</android.support.v7.widget.CardView>
</LinearLayout>
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_expert_search_big_shot_view.xml
0 → 100644
View file @
c2c21df2
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:parentTag=
"android.widget.LinearLayout"
>
</merge>
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_expert_search_top_all_view.xml
0 → 100644
View file @
c2c21df2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:clipChildren=
"true"
>
<android.support.v4.view.ViewPager
android:id=
"@+id/recommendViewPager"
android:paddingTop=
"11dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"#FAFAFA"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"15dp"
android:orientation=
"horizontal"
android:background=
"#FAFAFA"
android:gravity=
"center"
>
<View
android:id=
"@+id/leftIndicator"
android:layout_width=
"15dp"
android:layout_height=
"5dp"
android:layout_marginRight=
"3dp"
/>
<View
android:id=
"@+id/rightIndicator"
android:layout_width=
"15dp"
android:layout_height=
"5dp"
android:layout_marginLeft=
"3dp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/itemListView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingTop=
"15dp"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:paddingBottom=
"15dp"
android:orientation=
"vertical"
android:background=
"#FFFFFF"
>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_expert_search_top_item_view.xml
0 → 100644
View file @
c2c21df2
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
tools:parentTag=
"LinearLayout"
>
<android.support.v7.widget.CardView
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:background=
"#eeeeee"
android:layout_marginRight=
"10dp"
>
<ImageView
android:id=
"@+id/top_item_img"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:scaleType=
"centerCrop"
/>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/top_item_title"
android:layout_width=
"wrap_content"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:gravity=
"left|top"
android:text=
"标题"
android:textSize=
"14dp"
android:textColor=
"#242424"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/top_item_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"left|top"
android:text=
"我是描述"
android:textSize=
"11dp"
android:textColor=
"#999999"
/>
</LinearLayout>
</merge>
\ No newline at end of file
m-consultant/src/main/res/layout/consultant_layout_search_head_bg.xml
deleted
100644 → 0
View file @
6e7b007c
<?xml version="1.0" encoding="utf-8"?>
<com.yidianling.consultant.ui.view.DisInterceptNestedScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/search_head_bg"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/platform_white"
android:clipChildren=
"false"
android:clipToPadding=
"false"
app:layout_collapseMode=
"parallax"
app:layout_collapseParallaxMultiplier=
"0.8"
>
<android.support.v7.widget.CardView
android:id=
"@+id/user_head_container"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dp"
android:layout_marginTop=
"10dp"
android:layout_marginRight=
"15dp"
android:layout_marginBottom=
"10dp"
android:elevation=
"0dp"
android:orientation=
"vertical"
app:cardCornerRadius=
"4dp"
>
<com.ydl.ydlcommon.view.banner.Banner
android:id=
"@+id/banner_search"
android:layout_width=
"match_parent"
android:layout_height=
"99dp"
android:scaleType=
"centerCrop"
app:pa_indicator_different_width=
"14dp"
app:pa_indicator_drawable_selected=
"@drawable/consultant_banner_indicator_select"
app:pa_indicator_drawable_unselected=
"@drawable/consultant_banner_indicator_unselect"
app:pa_indicator_height=
"5dp"
app:pa_indicator_margin=
"1.25dp"
app:pa_is_selected_same_unselected=
"false"
app:pa_is_show_indicator=
"false"
/>
</android.support.v7.widget.CardView>
</com.yidianling.consultant.ui.view.DisInterceptNestedScrollView>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment