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
5b259dd7
Commit
5b259dd7
authored
Nov 05, 2019
by
konghaorui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试环境注释埋点代码,titlebar 新增属性 pa_left_start_icon_color
parent
f69402af
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
128 additions
and
38 deletions
+128
-38
build.gradle
app/build.gradle
+19
-19
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+4
-0
PlayFragment.java
app/src/main/java/com/ydl/component/music/PlayFragment.java
+1
-1
activity_main.xml
app/src/main/res/layout/activity_main.xml
+14
-0
styles.xml
m-consultant/src/main/res/values/styles.xml
+0
-1
AndroidManifest.xml
m-tests/src/main/AndroidManifest.xml
+2
-2
TestHomeUtils.kt
m-tests/src/main/java/com/yidianling/tests/home/utils/TestHomeUtils.kt
+2
-3
TestsApiServiceImp.kt
m-tests/src/main/java/com/yidianling/tests/modular/TestsApiServiceImp.kt
+2
-2
ITestsApiService.kt
m-tests/src/main/modular_api/com/yidianling/tests/api/service/ITestsApiService.kt
+1
-1
tests_activity_select_conversation.xml
m-tests/src/main/res/layout/tests_activity_select_conversation.xml
+1
-1
tests_activity_test_list.xml
m-tests/src/main/res/layout/tests_activity_test_list.xml
+1
-1
tests_testhome_activity.xml
m-tests/src/main/res/layout/tests_testhome_activity.xml
+7
-3
styles.xml
m-tests/src/main/res/values/styles.xml
+12
-0
colors.xml
m-tests/src/xlzx/res/values/colors.xml
+18
-0
colors.xml
m-tests/src/ydl/res/values/colors.xml
+18
-0
TitleBar.java
ydl-platform/src/main/java/com/ydl/ydlcommon/view/TitleBar.java
+25
-3
attrs.xml
ydl-platform/src/main/res/values/attrs.xml
+1
-1
No files found.
app/build.gradle
View file @
5b259dd7
...
...
@@ -4,7 +4,7 @@ apply plugin: 'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'kotlin-kapt'
apply
plugin:
'trace-point'
//
apply plugin: 'trace-point'
kapt
{
arguments
{
...
...
@@ -191,21 +191,21 @@ dependencies {
implementation
rootProject
.
ext
.
dependencies
[
"retrofit-url-manager"
]
kapt
'com.alibaba:arouter-compiler:1.2.2'
}
noTracePoint
{
outputModifyFile
=
false
targetPackages
=
[
'com.cxzapp.yidianling'
,
'com.yidianling.consultant'
,
'com.yidianling.course'
,
'com.yidianling.dynamic'
,
'com.ydl.home_module'
,
'com.yidianling.fm'
,
'com.yidianling.im'
,
'com.yidianling.avchatkit'
,
'com.yidianling.uikit'
,
'com.yidianling.phonecall'
,
'com.yidianling.tests'
,
'com.yidianling.user'
,
'com.yidianling.ydlcommon'
,
]
}
//
//
noTracePoint {
//
outputModifyFile = false
//
targetPackages = ['com.cxzapp.yidianling',
//
'com.yidianling.consultant',
//
'com.yidianling.course',
//
'com.yidianling.dynamic',
//
'com.ydl.home_module',
//
'com.yidianling.fm',
//
'com.yidianling.im',
//
'com.yidianling.avchatkit',
//
'com.yidianling.uikit',
//
'com.yidianling.phonecall',
//
'com.yidianling.tests',
//
'com.yidianling.user',
//
'com.yidianling.ydlcommon',
//
]
//
}
app/src/main/java/com/ydl/component/MainActivity.kt
View file @
5b259dd7
...
...
@@ -23,6 +23,7 @@ import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.ExpertSearchActivity.Companion.HOT_SEARCH_DOCTOR_NAME
import
com.yidianling.tests.home.TestHomeActivity
import
kotlinx.android.synthetic.main.activity_main.*
/**
...
...
@@ -76,6 +77,9 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bt_to_music
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
MusicPlayActivity
::
class
.
java
))
}
bt_to_tests
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
TestHomeActivity
::
class
.
java
))
}
bt_to_muse
.
setOnClickListener
{
YDLRouterManager
.
router
(
IYDLRouterConstant
.
ROUTER_MUSE
,
YDLRouterParams
().
putExtra
(
IYDLRouterConstant
.
MUSIC_URL
,
"http://video.yidianling.com/2019/05/30/e6d4a71e8c895f2156a2ff37d93ca3a9.mp3"
)
...
...
app/src/main/java/com/ydl/component/music/PlayFragment.java
View file @
5b259dd7
...
...
@@ -154,7 +154,7 @@ public class PlayFragment extends Fragment implements View.OnClickListener,
break
;
case
R
.
id
.
iv_play
:
play
();
if
(
PlayerFloatHelper
.
Companion
.
isShow
(
getActivity
()))
{
if
(
!
PlayerFloatHelper
.
Companion
.
isShow
(
getActivity
()))
{
PlayerFloatHelper
.
Companion
.
show
(
getActivity
(),
PlayTypeEnum
.
PLAY_TYPE_FM
,
new
HashMap
<>());
}
else
{
PlayerFloatHelper
.
Companion
.
showIfPlaying
(
getActivity
());
...
...
app/src/main/res/layout/activity_main.xml
View file @
5b259dd7
...
...
@@ -109,6 +109,20 @@
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<Button
android:id=
"@+id/bt_to_tests"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"30dp"
android:layout_marginTop=
"10dp"
android:text=
"Jump to Tests"
/>
</LinearLayout>
</LinearLayout>
<com.ydl.ydlcommon.mvp.lce.view.YDLStateView
...
...
m-consultant/src/main/res/values/styles.xml
View file @
5b259dd7
...
...
@@ -15,7 +15,6 @@
<item
name=
"colorPrimary"
>
@color/consultant_main_theme
</item>
<item
name=
"colorPrimaryDark"
>
@color/consultant_main_theme
</item>
<item
name=
"colorAccent"
>
@color/consultant_main_theme
</item>
</style>
<style
name=
"consultant_expert_service_popupwindow_filter_anim_style"
>
...
...
m-tests/src/main/AndroidManifest.xml
View file @
5b259dd7
...
...
@@ -8,7 +8,7 @@
<activity
android:name=
".list.view.TestCategoryListActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/
platform
_NoTitleTheme"
android:theme=
"@style/
tests
_NoTitleTheme"
/>
<activity
android:name=
".SelectConversationActivity"
...
...
@@ -16,7 +16,7 @@
<activity
android:name=
".search.TestSearchActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/
platform
_NoTitleTheme"
android:theme=
"@style/
tests
_NoTitleTheme"
/>
<!--测评首页-->
<activity
...
...
m-tests/src/main/java/com/yidianling/tests/home/utils/TestHomeUtils.kt
View file @
5b259dd7
...
...
@@ -10,7 +10,7 @@ import android.view.View
import
android.widget.TextView
import
com.ydl.ydlcommon.data.http.RxUtils
import
com.ydl.ydlcommon.data.http.ThrowableConsumer
import
com.ydl.ydlcommon.
router.YdlCommonRouter
Manager
import
com.ydl.ydlcommon.
modular.ModularService
Manager
import
com.ydl.ydlcommon.utils.MainUtils
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.yidianling.common.tools.LogUtil
...
...
@@ -256,8 +256,7 @@ class TestHomeUtils {
* 只有当和上一次优惠券金额不一致时才会发事件通知更新
*/
fun
updateCouponMoney
(){
val
loginBean
=
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUserInfo
()
var
userId
=
loginBean
?.
userId
?:
""
;
var
userId
=
ModularServiceManager
.
getPlatformUserService
()
?.
getUser
()
?.
userId
?:
""
;
TestRetrofitApi
.
getTestRetrofitApi
()
.
fetchMaxCoupon
(
userId
)
.
subscribeOn
(
Schedulers
.
io
())
...
...
m-tests/src/main/java/com/yidianling/tests/modular/TestsApiServiceImp.kt
View file @
5b259dd7
...
...
@@ -6,14 +6,14 @@ import com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.yidianling.tests.api.service.ITestsApiSer
i
vice
import
com.yidianling.tests.api.service.ITestsApiService
/**
* Created by haorui on 2019-10-31 .
* Des:
*/
@Route
(
path
=
"/tests/TestsApiService"
)
public
class
TestsApiServiceImp
:
ITestsApiSer
i
vice
{
public
class
TestsApiServiceImp
:
ITestsApiService
{
override
fun
init
(
context
:
Context
?)
{
}
...
...
m-tests/src/main/modular_api/com/yidianling/tests/api/service/ITestsApiSer
i
vice.kt
→
m-tests/src/main/modular_api/com/yidianling/tests/api/service/ITestsApiService.kt
View file @
5b259dd7
...
...
@@ -2,7 +2,7 @@ package com.yidianling.tests.api.service
import
com.alibaba.android.arouter.facade.template.IProvider
interface
ITestsApiSer
i
vice
:
IProvider
{
interface
ITestsApiService
:
IProvider
{
fun
testDetailH5
(
testId
:
String
)
...
...
m-tests/src/main/res/layout/tests_activity_select_conversation.xml
View file @
5b259dd7
...
...
@@ -8,7 +8,7 @@
<com.ydl.ydlcommon.view.TitleBar
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/platform_title_bar_height"
app:pa_left_start_icon
=
"@drawable/platform_toolbar_back
"
app:pa_left_start_icon
_color=
"@color/tests_main_theme
"
app:pa_title_text=
"最新联系人"
/>
<RelativeLayout
...
...
m-tests/src/main/res/layout/tests_activity_test_list.xml
View file @
5b259dd7
...
...
@@ -12,7 +12,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/platform_title_bar_height"
app:pa_bm_line_color=
"@color/transparent"
app:pa_left_start_icon
=
"@drawable/platform_toolbar_back
"
app:pa_left_start_icon
_color=
"@color/tests_main_theme
"
app:pa_right_iv=
"@drawable/platform_more12x"
app:pa_right_start_icon=
"@drawable/tests_icon_navsearch_green"
app:pa_title_text=
"心理测试"
/>
...
...
m-tests/src/main/res/layout/tests_testhome_activity.xml
View file @
5b259dd7
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
>
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/swipe_refresh_layout"
...
...
@@ -19,7 +20,10 @@
android:layout_height=
"match_parent"
android:visibility=
"gone"
/>
<include
layout=
"@layout/tests_testhome_bar"
/>
</FrameLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</FrameLayout>
m-tests/src/main/res/values/styles.xml
View file @
5b259dd7
...
...
@@ -19,4 +19,15 @@
<item
name=
"android:paddingLeft"
>
15dp
</item>
<item
name=
"android:paddingRight"
>
15dp
</item>
</style>
<style
name=
"tests_NoTitleTheme"
parent=
"Theme.AppCompat.Light.DarkActionBar"
>
<!-- Customize your theme here. -->
<item
name=
"android:windowActionBar"
>
false
</item>
<item
name=
"windowActionBar"
>
false
</item>
<item
name=
"windowNoTitle"
>
true
</item>
<item
name=
"colorPrimary"
>
@color/tests_main_theme
</item>
<item
name=
"colorPrimaryDark"
>
@color/tests_main_theme
</item>
<item
name=
"colorAccent"
>
@color/tests_main_theme
</item>
</style>
</resources>
\ No newline at end of file
m-tests/src/xlzx/res/values/colors.xml
0 → 100644
View file @
5b259dd7
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--主题色-->
<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>
</resources>
m-tests/src/ydl/res/values/colors.xml
0 → 100644
View file @
5b259dd7
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--主题色-->
<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>
</resources>
ydl-platform/src/main/java/com/ydl/ydlcommon/view/TitleBar.java
View file @
5b259dd7
...
...
@@ -2,7 +2,11 @@ package com.ydl.ydlcommon.view;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.res.Resources
;
import
android.content.res.TypedArray
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.graphics.drawable.Drawable
;
import
android.text.TextUtils
;
import
android.util.AttributeSet
;
...
...
@@ -13,8 +17,9 @@ import android.widget.ImageView;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
com.yidianling.common.tools.RxImageTool
;
import
com.ydl.ydlcommon.R
;
import
com.ydl.ydlcommon.utils.bitmap.BitmapUtils
;
import
com.yidianling.common.tools.RxImageTool
;
/**
...
...
@@ -31,6 +36,8 @@ public class TitleBar extends RelativeLayout {
int
mTextColor
,
mSideTextColor
;
//底部线颜色
int
buttom_color
;
//左侧图标颜色
int
mLeftStartIconColor
;
//文字内容
String
mLeftText
,
mTitle
,
mRightText
;
...
...
@@ -206,6 +213,10 @@ public class TitleBar extends RelativeLayout {
mSideTextColor
=
a
.
getColor
(
R
.
styleable
.
Platform_TitleBar_pa_side_text_color
,
0xff3c3c3c
);
//底部线颜色
buttom_color
=
a
.
getColor
(
R
.
styleable
.
Platform_TitleBar_pa_bm_line_color
,
getResources
().
getColor
(
R
.
color
.
platform_divide_color
));
//左侧图标颜色
mLeftStartIconColor
=
a
.
getColor
(
R
.
styleable
.
Platform_TitleBar_pa_left_start_icon_color
,
0xffffff
);
a
.
recycle
();
setGravity
(
Gravity
.
CENTER_VERTICAL
);
}
...
...
@@ -229,11 +240,10 @@ public class TitleBar extends RelativeLayout {
}
void
setupView
()
{
//左侧部分
tv_left_text
.
setText
(
mLeftText
);
tv_left_text
.
setTextColor
(
mSideTextColor
);
tv_left_text
.
setCompoundDrawablesWithIntrinsicBounds
(
mLeftStartIcon
,
null
,
mLeftEndIcon
,
null
);
tv_left_text
.
setCompoundDrawablesWithIntrinsicBounds
(
getLeftStartIcon
()
,
null
,
mLeftEndIcon
,
null
);
//中间部分
tv_center_title
.
setText
(
mTitle
);
tv_center_title
.
setTextColor
(
mTextColor
);
...
...
@@ -252,6 +262,18 @@ public class TitleBar extends RelativeLayout {
}
Drawable
getLeftStartIcon
(){
if
(
mLeftStartIconColor
!=
0xffffff
&&
mLeftStartIcon
==
null
)
{
//动态设置返回图标颜色
Resources
resources
=
this
.
getResources
();
Bitmap
bmp
=
BitmapFactory
.
decodeResource
(
resources
,
R
.
drawable
.
platform_toolbar_back
);
Bitmap
colorBmp
=
BitmapUtils
.
tintBitmap
(
bmp
,
mLeftStartIconColor
);
return
new
BitmapDrawable
(
resources
,
colorBmp
);
}
else
{
return
mLeftStartIcon
;
}
}
public
void
setDivideHidden
(
boolean
hide
)
{
if
(
hide
)
{
iv_title_divide
.
setVisibility
(
View
.
GONE
);
...
...
ydl-platform/src/main/res/values/attrs.xml
View file @
5b259dd7
...
...
@@ -13,8 +13,8 @@
<attr
name=
"pa_side_text_color"
format=
"color"
/>
<attr
name=
"pa_title_bar_text_color"
format=
"color|reference"
/>
<attr
name=
"pa_bm_line_color"
format=
"color"
/>
<attr
name=
"pa_right_iv"
format=
"reference"
/>
<attr
name=
"pa_left_start_icon_color"
format=
"color"
/>
</declare-styleable>
<attr
name=
"pa_left_text"
format=
"string"
/>
<attr
name=
"pa_right_text"
format=
"string"
/>
...
...
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