Commit 0884d82f by 刘鹏

feat :个性化开关功能

parent 886fb7aa
......@@ -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.01",
"m-user" : "0.0.62.02",
"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.01",
"m-user" : "0.0.62.02",
"m-home" : "0.0.22.98",
"m-im" : "0.0.21.21",
"m-dynamic" : "0.0.7.35",
......
......@@ -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"
......
......@@ -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));
}
}
......
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
......@@ -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"
......
<?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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment