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
0884d82f
Commit
0884d82f
authored
Apr 15, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat :个性化开关功能
parent
886fb7aa
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
119 additions
and
2 deletions
+119
-2
config.gradle
config.gradle
+2
-2
AndroidManifest.xml
m-user/src/main/AndroidManifest.xml
+5
-0
AccountSettingActivity.java
m-user/src/main/java/com/yidianling/user/mine/AccountSettingActivity.java
+5
-0
PersionalizeSettingActivity.kt
m-user/src/main/java/com/yidianling/user/mine/PersionalizeSettingActivity.kt
+40
-0
user_mine_activity_account_setting.xml
m-user/src/main/res/layout/user_mine_activity_account_setting.xml
+8
-0
user_mine_activity_persionalize_setting.xml
m-user/src/main/res/layout/user_mine_activity_persionalize_setting.xml
+59
-0
No files found.
config.gradle
View file @
0884d82f
...
...
@@ -8,7 +8,7 @@ ext {
"m-confide"
:
"0.0.49.64"
,
"m-consultant"
:
"0.0.60.11"
,
"m-fm"
:
"0.0.30.04"
,
"m-user"
:
"0.0.62.0
1
"
,
"m-user"
:
"0.0.62.0
2
"
,
"m-home"
:
"0.0.23.16"
,
"m-im"
:
"0.0.21.21"
,
"m-dynamic"
:
"0.0.7.35"
,
...
...
@@ -92,7 +92,7 @@ ext {
"m-confide"
:
"0.0.49.64"
,
"m-consultant"
:
"0.0.60.11"
,
"m-fm"
:
"0.0.30.07"
,
"m-user"
:
"0.0.62.0
1
"
,
"m-user"
:
"0.0.62.0
2
"
,
"m-home"
:
"0.0.22.98"
,
"m-im"
:
"0.0.21.21"
,
"m-dynamic"
:
"0.0.7.35"
,
...
...
m-user/src/main/AndroidManifest.xml
View file @
0884d82f
...
...
@@ -120,6 +120,11 @@
android:name=
".mine.NotificationsSettingActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/platform_NoTitleTheme"
/>
<!--个性化开关-->
<activity
android:name=
".mine.PersionalizeSettingActivity"
android:screenOrientation=
"portrait"
android:theme=
"@style/platform_NoTitleTheme"
/>
<activity
android:name=
".mine.PersonalDesActivity"
android:screenOrientation=
"portrait"
...
...
m-user/src/main/java/com/yidianling/user/mine/AccountSettingActivity.java
View file @
0884d82f
...
...
@@ -69,6 +69,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
JumpTextView
jtv_qq
;
RoundCornerButton
rcb_exit
;
JumpTextView
tvAccountUnRegister
;
JumpTextView
personalize_setting
;
@NotNull
@Override
...
...
@@ -94,6 +95,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
jtv_qq
=
findViewById
(
R
.
id
.
jtv_qq
);
rcb_exit
=
findViewById
(
R
.
id
.
rcb_exit
);
tvAccountUnRegister
=
findViewById
(
R
.
id
.
tv_account_unregister
);
personalize_setting
=
findViewById
(
R
.
id
.
personalize_setting
);
jtv_phone
.
setOnClickListener
(
this
);
jtv_change_password
.
setOnClickListener
(
this
);
...
...
@@ -103,6 +105,7 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
person_notify_setting
.
setOnClickListener
(
this
);
person_black_setting
.
setOnClickListener
(
this
);
tvAccountUnRegister
.
setOnClickListener
(
this
);
personalize_setting
.
setOnClickListener
(
this
);
init
();
EventBus
.
getDefault
().
register
(
this
);
...
...
@@ -277,6 +280,8 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
startActivity
(
new
Intent
(
this
,
NotificationsSettingActivity
.
class
));
}
else
if
(
id
==
R
.
id
.
tv_account_unregister
)
{
startActivity
(
new
Intent
(
this
,
AccountUnRegisterActivity
.
class
));
}
else
if
(
id
==
R
.
id
.
personalize_setting
){
startActivity
(
new
Intent
(
this
,
PersionalizeSettingActivity
.
class
));
}
}
...
...
m-user/src/main/java/com/yidianling/user/mine/PersionalizeSettingActivity.kt
0 → 100644
View file @
0884d82f
package
com.yidianling.user.mine
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.ydl.ydlcommon.base.BaseActivity
import
com.ydl.ydlcommon.bean.StatusBarOptions
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.yidianling.user.R
import
kotlinx.android.synthetic.main.user_mine_activity_persionalize_setting.*
/**
* 个性化开关,隐私政策需要
*/
@Route
(
path
=
"/user/persionalizesetting"
)
class
PersionalizeSettingActivity
:
BaseActivity
()
{
private
val
PERSIONNALIZE_KEY
=
"persionalize"
override
fun
layoutResId
():
Int
{
return
R
.
layout
.
user_mine_activity_persionalize_setting
}
override
fun
getStatusViewOptions
():
StatusBarOptions
{
return
StatusBarOptions
(
true
,
true
)
}
override
fun
initDataAndEvent
()
{
val
key
=
SharedPreferencesEditor
.
getString
(
PERSIONNALIZE_KEY
)
tb_check
.
isChecked
=
!(
key
!=
null
&&
key
==
"1"
)
tb_check
.
setOnClickListener
{
if
(
tb_check
.
isChecked
)
{
SharedPreferencesEditor
.
putString
(
PERSIONNALIZE_KEY
,
"0"
)
}
else
{
SharedPreferencesEditor
.
putString
(
PERSIONNALIZE_KEY
,
"1"
)
}
}
}
}
\ No newline at end of file
m-user/src/main/res/layout/user_mine_activity_account_setting.xml
View file @
0884d82f
...
...
@@ -77,6 +77,14 @@
app:pa_jump_tv_left_text=
"黑名单管理"
app:pa_jump_tv_right_color=
"#333333"
/>
<com.ydl.ydlcommon.view.JumpTextView
android:id=
"@+id/personalize_setting"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
app:pa_jump_tv_left_text=
"个性化选项"
app:pa_jump_tv_right_color=
"#333333"
/>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/divide_line_stroke_width"
...
...
m-user/src/main/res/layout/user_mine_activity_persionalize_setting.xml
0 → 100644
View file @
0884d82f
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<com.ydl.ydlcommon.view.TitleBar
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:background=
"@color/platform_white"
app:pa_left_end_icon=
"@drawable/platform_common_back"
app:pa_title_text=
"个性化设置"
/>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/divide_line_stroke_width"
android:layout_marginTop=
"14dp"
android:background=
"#EDEDED"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"55dp"
android:background=
"#ffffff"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"20dp"
android:ellipsize=
"end"
android:gravity=
"center_vertical"
android:singleLine=
"true"
android:text=
"开启个性化推荐"
android:textColor=
"#000000"
android:textSize=
"17sp"
/>
<ToggleButton
android:id=
"@+id/tb_check"
android:layout_width=
"70dp"
android:layout_height=
"30dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"20dp"
android:background=
"@drawable/user_mine_notify_bg"
android:checked=
"true"
android:textOff=
" "
android:textOn=
" "
/>
</RelativeLayout>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"16dp"
android:layout_marginRight=
"16dp"
android:text=
"关闭后,将不会使用你的偏好特征进行内容推荐,你可能会看不到感兴趣的内容"
android:textColor=
"@color/platform_color_666666"
/>
</LinearLayout>
\ No newline at end of file
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