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
5d0b11ab
Commit
5d0b11ab
authored
5 years ago
by
konghaorui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测评业务模块 UI 适配
parent
d89b0bd5
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
187 additions
and
103 deletions
+187
-103
ExpertSearchAdapter.kt
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
+1
-2
ConsultantIn.kt
m-consultant/src/main/java/com/yidianling/consultant/router/ConsultantIn.kt
+7
-0
build.gradle
m-tests/build.gradle
+3
-1
AndroidManifest.xml
m-tests/src/main/AndroidManifest.xml
+3
-1
TestHomeActivity.kt
m-tests/src/main/java/com/yidianling/tests/home/TestHomeActivity.kt
+20
-5
TestHomeEventImpl.kt
m-tests/src/main/java/com/yidianling/tests/home/event/TestHomeEventImpl.kt
+1
-2
TestCategoryListActivity.kt
m-tests/src/main/java/com/yidianling/tests/list/view/TestCategoryListActivity.kt
+2
-4
TestListFragment.kt
m-tests/src/main/java/com/yidianling/tests/list/view/TestListFragment.kt
+5
-8
CategoryConditionRecyclerViewAdapter.kt
m-tests/src/main/java/com/yidianling/tests/list/view/adapter/CategoryConditionRecyclerViewAdapter.kt
+2
-2
TestsApiServiceImp.kt
m-tests/src/main/java/com/yidianling/tests/modular/TestsApiServiceImp.kt
+8
-9
TestsIn.kt
m-tests/src/main/java/com/yidianling/tests/router/TestsIn.kt
+18
-2
TestSearchActivity.kt
m-tests/src/main/java/com/yidianling/tests/search/TestSearchActivity.kt
+3
-3
tests_ic_arrow_drop_down.png
m-tests/src/main/res/drawable-xhdpi/tests_ic_arrow_drop_down.png
+0
-0
tests_bg_btn_big_corner_border_green.xml
m-tests/src/main/res/drawable/tests_bg_btn_big_corner_border_green.xml
+2
-2
tests_bg_btn_big_corner_green.xml
m-tests/src/main/res/drawable/tests_bg_btn_big_corner_green.xml
+3
-2
tests_bg_btn_no_corner_green.xml
m-tests/src/main/res/drawable/tests_bg_btn_no_corner_green.xml
+3
-2
tests_progressbar_test.xml
m-tests/src/main/res/drawable/tests_progressbar_test.xml
+2
-2
tests_testhome_bg.xml
m-tests/src/main/res/drawable/tests_testhome_bg.xml
+3
-2
tests_activity_test_category_list.xml
m-tests/src/main/res/layout/tests_activity_test_category_list.xml
+1
-0
tests_activity_test_list.xml
m-tests/src/main/res/layout/tests_activity_test_list.xml
+2
-2
tests_item_hot_search.xml
m-tests/src/main/res/layout/tests_item_hot_search.xml
+1
-1
tests_testhome_activity.xml
m-tests/src/main/res/layout/tests_testhome_activity.xml
+9
-7
tests_testhome_banner_view.xml
m-tests/src/main/res/layout/tests_testhome_banner_view.xml
+4
-3
tests_testhome_bar.xml
m-tests/src/main/res/layout/tests_testhome_bar.xml
+7
-10
tests_ic_arrow_drop_down.png
m-tests/src/xlzx/res/drawable-xhdpi/tests_ic_arrow_drop_down.png
+0
-0
colors.xml
m-tests/src/xlzx/res/values/colors.xml
+1
-12
tests_ic_arrow_drop_down.png
m-tests/src/ydl/res/drawable-xhdpi/tests_ic_arrow_drop_down.png
+0
-0
colors.xml
m-tests/src/ydl/res/values/colors.xml
+1
-12
PrivacyDialog.kt
m-user/src/main/java/com/yidianling/user/widget/PrivacyDialog.kt
+2
-2
IYdlCommonRouter.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/router/IYdlCommonRouter.kt
+0
-2
H5RouterUtils.kt
ydl-webview/src/main/java/com/ydl/webview/H5RouterUtils.kt
+73
-0
WebModularServiceUtils.kt
ydl-webview/src/main/java/com/ydl/webview/WebModularServiceUtils.kt
+0
-3
No files found.
m-consultant/src/main/java/com/yidianling/consultant/adapter/ExpertSearchAdapter.kt
View file @
5d0b11ab
...
...
@@ -14,7 +14,6 @@ import com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.router.YdlCommonRouterManager
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.URLUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
...
...
@@ -332,7 +331,7 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch
itemView
.
tvChat
.
setOnClickListener
{
if
(
adapterPosition
!=
RecyclerView
.
NO_POSITION
)
{
//判断是否已登录
if
(!
YdlCommonRouterManager
.
getYdlCommonRoute
().
isLogin
()){
if
(!
ConsultantIn
.
getUserImpl
().
isLogin
()){
TempH5RouteUtils
.
tempH5Route
(
IYDLRouterConstant
.
ROUTER_MINE_LOGIN
)
return
@setOnClickListener
}
...
...
This diff is collapsed.
Click to expand it.
m-consultant/src/main/java/com/yidianling/consultant/router/ConsultantIn.kt
View file @
5d0b11ab
...
...
@@ -4,7 +4,9 @@ import android.app.Activity
import
android.content.Context
import
android.content.Intent
import
android.support.v7.app.AppCompatActivity
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.yidianling.router.RouterManager
import
com.yidianling.user.api.service.IUserService
/**
* author : Zhangwenchao
...
...
@@ -26,4 +28,8 @@ object ConsultantIn {
return
RouterManager
.
getAppRouter
()
?.
mainIntent
(
activity
)
}
fun
getUserImpl
():
IUserService
{
return
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
m-tests/build.gradle
View file @
5d0b11ab
...
...
@@ -76,9 +76,11 @@ dependencies {
api
project
(
':ydl-webview'
)
api
project
(
':ydl-platform'
)
implementation
modularPublication
(
'com.ydl:m-test-api'
)
implementation
modularPublication
(
'com.ydl:m-user-api'
)
}
else
{
//发布时使用
implementation
modularPublication
(
'com.ydl:m-test-api'
)
compileOnly
modularPublication
(
'com.ydl:m-test-api'
)
compileOnly
rootProject
.
ext
.
dependencies
[
"ydl-m-user-api"
]
api
rootProject
.
ext
.
dependencies
[
"ydl-webview"
]
api
(
rootProject
.
ext
.
dependencies
[
"ydl-platform"
])
{
transitive
=
true
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/AndroidManifest.xml
View file @
5d0b11ab
...
...
@@ -21,6 +21,8 @@
<!--测评首页-->
<activity
android:name=
".home.TestHomeActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
android:theme=
"@style/tests_NoTitleTheme"
/>
</application>
</manifest>
This diff is collapsed.
Click to expand it.
m-tests/src/main/java/com/yidianling/tests/home/TestHomeActivity.kt
View file @
5d0b11ab
package
com.yidianling.tests.home
import
android.os.Build
import
android.support.v4.content.ContextCompat
import
android.support.v4.widget.SwipeRefreshLayout
import
android.support.v7.widget.LinearLayoutManager
import
android.support.v7.widget.RecyclerView
import
android.text.TextUtils
import
android.view.View
import
android.widget.LinearLayout
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.google.gson.Gson
import
com.google.gson.reflect.TypeToken
import
com.ydl.ydlcommon.base.BaseMvpActivity
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.utils.YDLAsyncUtils
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.*
import
com.ydl.ydlcommon.utils.remind.ToastHelper
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.tests.R
import
com.yidianling.tests.home.adapter.AdapterWrapper
import
com.yidianling.tests.home.adapter.TestHomeAdapter
...
...
@@ -97,8 +97,23 @@ class TestHomeActivity : BaseMvpActivity<ITestHomeContract.View,ITestHomeContrac
img_mine
.
setOnClickListener
{
(
testHomeEvent
as
TestHomeEventImpl
).
jumpMine
()
}
initStatus
()
}
/**
* 初始化状态栏位置
*/
private
fun
initStatus
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
//4.4以下不支持状态栏变色
StatusBarUtils
.
setTransparentForImageView
(
this
,
null
)
val
statusBarHeight
=
StatusBarUtils
.
getStatusBarHeight
(
this
)
val
lp1
=
rl_tests_title_layout
.
layoutParams
as
LinearLayout
.
LayoutParams
lp1
.
height
=
(
RxImageTool
.
dp2px
(
48f
)
+
statusBarHeight
)
rl_tests_title_layout
.
setPadding
(
0
,
statusBarHeight
,
0
,
0
)
}
}
//路由传递过来的参数
private
fun
getRouterParam
()
{
if
(
null
!=
intent
&&
intent
.
hasExtra
(
"routerParam"
))
{
...
...
@@ -112,7 +127,7 @@ class TestHomeActivity : BaseMvpActivity<ITestHomeContract.View,ITestHomeContrac
private
fun
initAdapter
()
{
swipe_refresh_layout
.
setOnRefreshListener
(
this
)
swipe_refresh_layout
.
setColorSchemeColors
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
platform_main_theme_blu
e
))
swipe_refresh_layout
.
setColorSchemeColors
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
tests_main_them
e
))
mLayoutManager
=
LinearLayoutManager
(
mContext
,
LinearLayoutManager
.
VERTICAL
,
false
)
recyclerview
.
layoutManager
=
mLayoutManager
if
(
null
==
mTestHomeAdapter
)
{
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/java/com/yidianling/tests/home/event/TestHomeEventImpl.kt
View file @
5d0b11ab
...
...
@@ -10,7 +10,6 @@ import com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.yidianling.router.RouterManager
import
com.yidianling.tests.list.view.TestCategoryListActivity
import
com.yidianling.tests.router.TestsIn
import
com.yidianling.tests.search.TestSearchActivity
...
...
@@ -122,7 +121,7 @@ class TestHomeEventImpl(mContext: Context) : ITestHomeEvent {
if
(
"ceshi"
==
uri
.
host
)
{
val
id
=
uri
.
getQueryParameter
(
"id"
)
// YDLRouterManager.router(IYDLRouterConstant.ROUTER_TEST_DETAIL, YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_ID, id))
RouterManager
.
getTestsRouter
()
?
.
testDetailH5
(
id
)
TestsIn
.
getTestsImpl
()
.
testDetailH5
(
id
)
}
}
else
if
(
linkUrl
.
startsWith
(
"http"
))
{
YDLRouterManager
.
router
(
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/java/com/yidianling/tests/list/view/TestCategoryListActivity.kt
View file @
5d0b11ab
...
...
@@ -14,13 +14,11 @@ import com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.DisplayUtils
import
com.ydl.ydlcommon.utils.StatusBarUtils
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.ydl.ydlcommon.utils.remind.HttpErrorUtils
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.tests.R
import
com.yidianling.tests.TestsBIConstants
import
com.yidianling.tests.home.utils.TestHomeUtils
import
com.yidianling.tests.list.model.bean.CategotyPopItem
import
com.yidianling.tests.list.model.bean.TestCategory
...
...
@@ -308,8 +306,8 @@ class TestCategoryListActivity : BaseMvpActivity<TestListActivityView, TestListA
tv
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
platform_colorTextDefault
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_ic_arrow_drop_down_grey_500_18dp
,
0
)
}
else
{
tv
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
platform_google_green
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_ic_arrow_drop_down_green_18dp
,
0
)
tv
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
tests_main_theme
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
tests_ic_arrow_drop_down
,
0
)
}
}
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/java/com/yidianling/tests/list/view/TestListFragment.kt
View file @
5d0b11ab
...
...
@@ -17,16 +17,12 @@ import com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.router.YdlCommonOut
import
com.ydl.ydlcommon.router.YdlCommonRouterManager
import
com.ydl.ydlcommon.utils.BuryPointUtils
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.router.RouterManager
import
com.yidianling.tests.R
import
com.yidianling.tests.TestRetrofitApi
import
com.yidianling.tests.TestsBIConstants
import
com.yidianling.tests.home.event.UpdateCouponMoneyEvent
import
com.yidianling.tests.home.utils.TestHomeUtils
import
com.yidianling.tests.list.model.bean.Test
...
...
@@ -110,7 +106,8 @@ class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test>
}
fun
fetchTestList
()
{
val
loginBean
=
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUserInfo
()
val
loginBean
=
TestsIn
.
getYDLUserInfo
()
var
userId
=
loginBean
?.
userId
?:
""
;
disposable
=
TestRetrofitApi
.
getTestRetrofitApi
()
...
...
@@ -173,12 +170,12 @@ class TestListFragment : BaseFragment(), MyBaseAdapter.OnItemClickListener<Test>
}
else
{
when
(
listType
)
{
1
->
{
RouterManager
.
getTestsRouter
()
?
.
testDetailH5
(
data
.
id
.
toString
())
TestsIn
.
getTestsImpl
()
.
testDetailH5
(
data
.
id
.
toString
())
}
2
->
{
RouterManager
.
getTestsRouter
()
?
.
testH5Result
(
data
.
testResultId
.
toString
());
TestsIn
.
getTestsImpl
()
.
testH5Result
(
data
.
testResultId
.
toString
());
}
else
->
RouterManager
.
getTestsRouter
()
?
.
testDetailH5
(
data
.
id
.
toString
())
else
->
TestsIn
.
getTestsImpl
()
.
testDetailH5
(
data
.
id
.
toString
())
}
}
}
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/java/com/yidianling/tests/list/view/adapter/CategoryConditionRecyclerViewAdapter.kt
View file @
5d0b11ab
...
...
@@ -34,7 +34,7 @@ class CategoryConditionRecyclerViewAdapter(private val context: Context,
holder
.
tvSort
.
text
=
item
.
value
holder
.
tvSort
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
platform_color_242424
))
if
(!
TextUtils
.
isEmpty
(
lastSelectText
)
&&
item
.
value
.
equals
(
lastSelectText
)
&&
position
!=
0
){
holder
.
tvSort
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
platform_google_green
))
holder
.
tvSort
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
tests_main_theme
))
lastSelectView
=
holder
.
tvSort
}
}
...
...
@@ -49,7 +49,7 @@ class CategoryConditionRecyclerViewAdapter(private val context: Context,
lastSelectView
?.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
platform_color_242424
))
if
(
adapterPosition
!=
0
){
tvSort
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
platform_google_green
))
tvSort
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
tests_main_theme
))
}
if
(
adapterPosition
!=
RecyclerView
.
NO_POSITION
){
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/java/com/yidianling/tests/modular/TestsApiServiceImp.kt
View file @
5d0b11ab
...
...
@@ -2,10 +2,10 @@ package com.yidianling.tests.modular
import
android.content.Context
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.yidianling.tests.api.service.ITestsApiService
/**
...
...
@@ -19,14 +19,12 @@ public class TestsApiServiceImp : ITestsApiService {
}
override
fun
testH5Result
(
testResultId
:
String
)
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
HttpConfig
.
MH5_URL
+
"ceshi/result/"
+
testResultId
),
""
)
val
h5Params
=
H5Params
(
HttpConfig
.
MH5_URL
+
"ceshi/result/"
+
testResultId
,
null
)
NewH5Activity
.
start
(
BaseApp
.
getApp
(),
h5Params
)
}
override
fun
testDetailH5
(
testId
:
String
)
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_H5_H5
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
EXTRA_URL
,
HttpConfig
.
MH5_URL
+
"ceshi/"
+
testId
),
""
)
val
h5Params
=
H5Params
(
HttpConfig
.
MH5_URL
+
"ceshi/"
+
testId
,
null
)
NewH5Activity
.
start
(
BaseApp
.
getApp
(),
h5Params
)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
m-tests/src/main/java/com/yidianling/tests/router/TestsIn.kt
View file @
5d0b11ab
...
...
@@ -2,8 +2,13 @@ package com.yidianling.tests.router
import
android.app.Activity
import
android.content.Intent
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.router.YdlUserInfo
import
com.yidianling.router.RouterManager
import
com.yidianling.router.im.IMRequestCallback
import
com.yidianling.tests.api.service.ITestsApiService
import
com.yidianling.user.api.bean.UserResponseBean
import
com.yidianling.user.api.service.IUserService
/**
* author : Zhangwenchao
...
...
@@ -12,12 +17,23 @@ import com.yidianling.router.im.IMRequestCallback
*/
object
TestsIn
{
fun
getTestsImpl
():
ITestsApiService
{
return
ModularServiceManager
.
provide
(
ITestsApiService
::
class
.
java
)
}
fun
isLogin
():
Boolean
{
return
RouterManager
.
getUserRouter
()
?.
isLogin
()
?:
false
return
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
isLogin
()
}
fun
getYDLUserInfo
():
YdlUserInfo
?
{
return
ModularServiceManager
.
getPlatformUserService
()
?.
getUser
()
}
fun
getUserInfo
():
UserResponseBean
.
UserInfo
?
{
return
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
getUserInfo
()
}
fun
loginWayIntent
(
activity
:
Activity
):
Intent
?
{
return
RouterManager
.
getUserRouter
()
?
.
loginWayIntent
(
activity
)
return
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
)
.
loginWayIntent
(
activity
)
}
fun
publishTrendIntent
(
activity
:
Activity
,
url
:
String
,
cover
:
String
,
title
:
String
):
Intent
?
{
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/java/com/yidianling/tests/search/TestSearchActivity.kt
View file @
5d0b11ab
...
...
@@ -21,13 +21,13 @@ import com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.view.listener.EndlessRecyclerViewScrollListener
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.router.RouterManager
import
com.yidianling.tests.R
import
com.yidianling.tests.home.event.UpdateCouponMoneyEvent
import
com.yidianling.tests.home.utils.TestHomeUtils
import
com.yidianling.tests.list.model.bean.RecommendSearchItemBean
import
com.yidianling.tests.list.model.bean.Test
import
com.yidianling.tests.list.view.adapter.TestListRecyclerAdapter
import
com.yidianling.tests.router.TestsIn
import
de.greenrobot.event.EventBus
import
kotlinx.android.synthetic.main.tests_activity_test_search.*
import
kotlinx.android.synthetic.main.tests_item_hot_search.view.*
...
...
@@ -98,11 +98,11 @@ class TestSearchActivity : BaseMvpActivity<TestSearchView, TestSearchPresenter>(
hotSearchAdapter
=
TestListRecyclerAdapter
(
this
,
hotSearchedTestList
,
TestListRecyclerAdapter
.
PAGE_TYPE_SEARCH
)
searchAdapter
?.
onItemClickListener
=
MyBaseAdapter
.
OnItemClickListener
{
_
,
_
,
data
->
RouterManager
.
getTestsRouter
()
?
.
testDetailH5
(
data
.
id
.
toString
())
TestsIn
.
getTestsImpl
()
.
testDetailH5
(
data
.
id
.
toString
())
}
hotSearchAdapter
?.
onItemClickListener
=
MyBaseAdapter
.
OnItemClickListener
{
_
,
_
,
data
->
RouterManager
.
getTestsRouter
()
?
.
testDetailH5
(
data
.
id
.
toString
())
TestsIn
.
getTestsImpl
()
.
testDetailH5
(
data
.
id
.
toString
())
}
headerHotSearch
=
View
.
inflate
(
this
,
R
.
layout
.
tests_header_hot_search
,
null
)
as
LinearLayout
?;
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/drawable-xhdpi/tests_ic_arrow_drop_down.png
0 → 100644
View file @
5d0b11ab
2.83 KB
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/drawable/tests_bg_btn_big_corner_border_green.xml
View file @
5d0b11ab
...
...
@@ -2,7 +2,7 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"true"
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<stroke
android:width=
"1dp"
android:color=
"@color/
platform_google_green
"
/>
<stroke
android:width=
"1dp"
android:color=
"@color/
tests_main_theme
"
/>
<corners
android:radius=
"100dp"
/>
<solid
android:color=
"#cacaca"
/>
</shape>
...
...
@@ -10,7 +10,7 @@
<item
android:state_enabled=
"true"
android:state_pressed=
"false"
>
<shape
android:shape=
"rectangle"
>
<stroke
android:width=
"1dp"
android:color=
"@color/
platform_google_green
"
/>
<stroke
android:width=
"1dp"
android:color=
"@color/
tests_main_theme
"
/>
<corners
android:radius=
"100dp"
/>
<solid
android:color=
"@color/white"
/>
</shape>
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/drawable/tests_bg_btn_big_corner_green.xml
View file @
5d0b11ab
...
...
@@ -3,14 +3,14 @@
<item
android:state_enabled=
"true"
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"100dp"
/>
<solid
android:color=
"@color/
platform_google_green_dark
"
/>
<solid
android:color=
"@color/
tests_main_theme
"
/>
</shape>
</item>
<item
android:state_enabled=
"true"
android:state_pressed=
"false"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"100dp"
/>
<solid
android:color=
"@color/
platform_google_green
"
/>
<solid
android:color=
"@color/
tests_main_theme
"
/>
</shape>
</item>
</selector>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/drawable/tests_bg_btn_no_corner_green.xml
View file @
5d0b11ab
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"true"
android:state_pressed=
"true"
>
<color
android:color=
"@color/
platform_google_green_dark
"
/>
<color
android:color=
"@color/
tests_main_theme
"
/>
</item>
<item
android:state_enabled=
"true"
android:state_pressed=
"false"
>
<color
android:color=
"@color/
platform_google_green
"
/>
<color
android:color=
"@color/
tests_main_theme
"
/>
</item>
</selector>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/drawable/tests_progressbar_test.xml
View file @
5d0b11ab
...
...
@@ -8,14 +8,14 @@
<item
android:id=
"@android:id/secondaryProgress"
>
<clip>
<shape>
<solid
android:color=
"@color/
platform_google_green
"
/>
<solid
android:color=
"@color/
tests_main_theme
"
/>
</shape>
</clip>
</item>
<item
android:id=
"@android:id/progress"
>
<clip>
<shape>
<solid
android:color=
"@color/
platform_google_green
"
/>
<solid
android:color=
"@color/
tests_main_theme
"
/>
</shape>
</clip>
</item>
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/drawable/tests_testhome_bg.xml
View file @
5d0b11ab
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<gradient
android:startColor=
"
#56CCF2
"
android:endColor=
"
#2F80ED
"
android:startColor=
"
@color/tests_main_theme_light
"
android:endColor=
"
@color/tests_main_theme
"
android:angle=
"0"
/>
</shape>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/layout/tests_activity_test_category_list.xml
View file @
5d0b11ab
...
...
@@ -69,6 +69,7 @@
app:pa_tab_height=
"44dp"
app:pa_tab_indicator_margin=
"13dp"
app:pa_tab_mode=
"scrollable"
app:pa_indicator_color=
"@color/tests_main_theme"
/>
<LinearLayout
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/layout/tests_activity_test_list.xml
View file @
5d0b11ab
...
...
@@ -45,9 +45,9 @@
android:id=
"@+id/tabLayout"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
app:tabIndicatorColor=
"@color/
platform_google_green
"
app:tabIndicatorColor=
"@color/
tests_main_theme
"
app:tabMode=
"scrollable"
app:tabSelectedTextColor=
"@color/
platform_google_green
"
/>
app:tabSelectedTextColor=
"@color/
tests_main_theme
"
/>
<View
android:layout_width=
"match_parent"
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/layout/tests_item_hot_search.xml
View file @
5d0b11ab
...
...
@@ -12,6 +12,6 @@
android:orientation=
"vertical"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:textColor=
"@color/
platform_google_green
"
android:textColor=
"@color/
tests_main_theme
"
tools:text=
"自闭症"
/>
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/layout/tests_testhome_activity.xml
View file @
5d0b11ab
<?xml version="1.0" encoding="utf-8"?>
<
Frame
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<include
layout=
"@layout/tests_testhome_bar"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
/>
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/swipe_refresh_layout"
...
...
@@ -20,10 +26,6 @@
android:layout_height=
"match_parent"
android:visibility=
"gone"
/>
<include
layout=
"@layout/tests_testhome_bar"
/>
</FrameLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</
Frame
Layout>
</
Linear
Layout>
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/layout/tests_testhome_banner_view.xml
View file @
5d0b11ab
...
...
@@ -3,14 +3,15 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"1
62
dp"
android:layout_height=
"1
14
dp"
android:background=
"@drawable/tests_testhome_bg"
/>
<android.support.v7.widget.CardView
xmlns:app=
"http://schemas.android.com/apk/res-auto"
<android.support.v7.widget.CardView
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"15dp"
android:layout_marginTop=
"
54
dp"
android:layout_marginTop=
"
6
dp"
android:layout_marginRight=
"15dp"
app:cardCornerRadius=
"6dp"
app:cardElevation=
"2dp"
>
...
...
This diff is collapsed.
Click to expand it.
m-tests/src/main/res/layout/tests_testhome_bar.xml
View file @
5d0b11ab
<?xml version="1.0" encoding="utf-8"?>
<
Fram
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Relativ
eLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:orientation=
"horizontal"
>
<View
android:id=
"@+id/v_bg"
android:layout_width=
"match_parent"
android:layout_height=
"48dp"
android:background=
"@drawable/tests_testhome_bg"
/>
android:orientation=
"horizontal"
android:id=
"@+id/rl_tests_title_layout"
android:background=
"@drawable/tests_testhome_bg"
>
<LinearLayout
android:id=
"@+id/ll_bar_root"
android:layout_width=
"match_parent"
android:layout_height=
"
48dp
"
android:layout_height=
"
match_parent
"
android:orientation=
"horizontal"
>
<ImageView
...
...
@@ -55,4 +52,4 @@
android:padding=
"5dp"
android:src=
"@drawable/tests_testhome_mine"
/>
</LinearLayout>
</
Fram
eLayout>
</
Relativ
eLayout>
This diff is collapsed.
Click to expand it.
m-tests/src/xlzx/res/drawable-xhdpi/tests_ic_arrow_drop_down.png
0 → 100644
View file @
5d0b11ab
16.9 KB
This diff is collapsed.
Click to expand it.
m-tests/src/xlzx/res/values/colors.xml
View file @
5d0b11ab
...
...
@@ -3,16 +3,5 @@
<!--主题色-->
<color
name=
"tests_main_theme"
>
#fdbd00
</color>
<!--主题浅色-->
<color
name=
"tests_main_theme_light"
>
#FFEC8C
</color>
<!--主题亮色-->
<color
name=
"tests_main_theme_bright"
>
#fffae0
</color>
<!--确认按钮背景颜色-->
<color
name=
"tests_confirm_bg_color"
>
#FFDD33
</color>
<!--确认按钮字体颜色-->
<color
name=
"tests_confirm_text_color"
>
#242424
</color>
<!--确认按钮提示字体颜色-->
<color
name=
"tests_confirm_text_hint_color"
>
#666666
</color>
<!--筛选条件选择框字体颜色-->
<color
name=
"tests_filter_content_text_color_en"
>
#242424
</color>
<color
name=
"tests_filter_content_text_color_un"
>
#555555
</color>
<color
name=
"tests_main_theme_light"
>
#FCDA42
</color>
</resources>
This diff is collapsed.
Click to expand it.
m-tests/src/ydl/res/drawable-xhdpi/tests_ic_arrow_drop_down.png
0 → 100644
View file @
5d0b11ab
2.83 KB
This diff is collapsed.
Click to expand it.
m-tests/src/ydl/res/values/colors.xml
View file @
5d0b11ab
...
...
@@ -3,16 +3,5 @@
<!--主题色-->
<color
name=
"tests_main_theme"
>
#1da1f2
</color>
<!--主题浅色-->
<color
name=
"tests_main_theme_light"
>
#60BDF5
</color>
<!--主题亮色-->
<color
name=
"tests_main_theme_bright"
>
#E8F6FF
</color>
<!--确认按钮背景颜色-->
<color
name=
"tests_confirm_bg_color"
>
#1da1f2
</color>
<!--确认按钮颜色-->
<color
name=
"tests_confirm_text_color"
>
#ffffff
</color>
<!--确认提示颜色-->
<color
name=
"tests_confirm_text_hint_color"
>
#60ffffff
</color>
<!--筛选条件选择框字体颜色-->
<color
name=
"tests_filter_content_text_color_en"
>
#1da1f2
</color>
<color
name=
"tests_filter_content_text_color_un"
>
#242424
</color>
<color
name=
"tests_main_theme_light"
>
#56CCF2
</color>
</resources>
This diff is collapsed.
Click to expand it.
m-user/src/main/java/com/yidianling/user/widget/PrivacyDialog.kt
View file @
5d0b11ab
...
...
@@ -14,7 +14,7 @@ import android.text.method.LinkMovementMethod
import
android.text.style.ClickableSpan
import
android.view.View
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.
router.YdlCommonRouter
Manager
import
com.ydl.ydlcommon.
modular.ModularService
Manager
import
com.yidianling.common.tools.LogUtil
import
com.yidianling.user.LoginUtils
import
com.yidianling.user.R
...
...
@@ -111,7 +111,7 @@ class PrivacyDialog : Dialog {
if
(
UserHelper
.
getUserInfo
()
!=
null
&&
!
TextUtils
.
isEmpty
(
UserHelper
.
getUserInfo
()
!!
.
uid
))
{
uid
=
UserHelper
.
getUserInfo
()
!!
.
uid
!!
}
else
{
val
loginBean
=
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUserInfo
()
val
loginBean
=
ModularServiceManager
.
getPlatformUserService
()
?.
getUser
()
if
(
loginBean
!=
null
)
{
uid
=
loginBean
.
userId
}
...
...
This diff is collapsed.
Click to expand it.
ydl-platform/src/main/java/com/ydl/ydlcommon/router/IYdlCommonRouter.kt
View file @
5d0b11ab
...
...
@@ -38,8 +38,6 @@ interface IYdlCommonRouter {
fun
startP2PXiaoYi
(
context
:
Context
)
fun
isLogin
():
Boolean
fun
getUid
():
Int
fun
getAccessToken
():
String
?
...
...
This diff is collapsed.
Click to expand it.
ydl-webview/src/main/java/com/ydl/webview/H5RouterUtils.kt
0 → 100644
View file @
5d0b11ab
package
com.ydl.webview
import
android.net.Uri
import
android.text.TextUtils
import
com.alibaba.android.arouter.launcher.ARouter
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydl_router.util.YDLRouterUtils
import
com.yidianling.common.tools.LogUtil
import
java.io.UnsupportedEncodingException
import
java.net.URLDecoder
/**
* Created by haorui on 2019-10-13.
* Des:使用接口返回的 router 链接打开H5页面
*/
object
H5RouterUtils
{
/**
* 完整的 router 链接
*/
fun
tempH5Route
(
linkUrl
:
String
?)
{
if
(
TextUtils
.
isEmpty
(
linkUrl
))
{
return
}
val
linkUri
=
Uri
.
parse
(
linkUrl
)
if
(
linkUri
!=
null
)
{
val
host
=
linkUri
.
host
if
(!
TextUtils
.
isEmpty
(
host
)
&&
host
==
"h5"
)
{
//如果是h5,跳转至NewH5Activity
try
{
var
params
=
URLDecoder
.
decode
(
linkUri
.
getQueryParameter
(
"params"
),
"UTF-8"
)
ARouter
.
getInstance
().
build
(
"/new_h5/h5"
).
withSerializable
(
"routerParam"
,
params
).
navigation
()
return
}
catch
(
e
:
NullPointerException
){
LogUtil
.
e
(
"params参数为空"
)
}
catch
(
e
:
UnsupportedEncodingException
){
LogUtil
.
e
(
"解码错误"
)
}
catch
(
e
:
UnsupportedOperationException
){
LogUtil
.
e
(
"这不是一个uri格式的地址"
)
}
return
}
}
YDLRouterManager
.
router
(
linkUrl
)
}
fun
tempH5Route
(
linkUrl
:
String
?,
params
:
YDLRouterParams
?,
callBack
:
String
?)
{
if
(
TextUtils
.
isEmpty
(
linkUrl
))
{
return
}
val
newUrl
=
linkUrl
+
YDLRouterUtils
.
ergodic
(
params
)
+
"&callback="
+
callBack
val
linkUri
=
Uri
.
parse
(
newUrl
)
if
(
linkUri
!=
null
)
{
val
host
=
linkUri
.
host
if
(!
TextUtils
.
isEmpty
(
host
)
&&
host
==
"h5"
)
{
//如果是h5,跳转至NewH5Activity
try
{
var
params
=
URLDecoder
.
decode
(
linkUri
.
getQueryParameter
(
"params"
),
"UTF-8"
)
ARouter
.
getInstance
().
build
(
"/new_h5/h5"
).
withSerializable
(
"routerParam"
,
params
).
navigation
()
return
}
catch
(
e
:
NullPointerException
){
LogUtil
.
e
(
"params参数为空"
)
}
catch
(
e
:
UnsupportedEncodingException
){
LogUtil
.
e
(
"解码错误"
)
}
catch
(
e
:
UnsupportedOperationException
){
LogUtil
.
e
(
"这不是一个uri格式的地址"
)
}
return
}
}
YDLRouterManager
.
router
(
linkUrl
,
params
)
}
}
This diff is collapsed.
Click to expand it.
ydl-webview/src/main/java/com/ydl/webview/WebModularServiceUtils.kt
View file @
5d0b11ab
...
...
@@ -28,9 +28,6 @@ class WebModularServiceUtils {
fun
startMain
(
activity
:
Activity
){
YdlCommonRouterManager
.
getYdlCommonRoute
().
startMain
(
activity
,
false
)
// ARouter.getInstance().build("/main/main")
// .withFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
// .navigation()
}
}
}
This diff is collapsed.
Click to expand it.
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