个人信息与权限页面新增部分协议
This commit is contained in:
@@ -2,16 +2,11 @@ package com.yizhuan.erban.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import com.yizhuan.erban.BuildConfig
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseActivity
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityPermissionGuideBinding
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity
|
||||
import com.yizhuan.erban.utils.PermissionUtil
|
||||
import com.yizhuan.xchat_android_core.UriProvider
|
||||
|
||||
class PermissionGuideActivity : BaseViewBindingActivity<ActivityPermissionGuideBinding>(),
|
||||
@@ -32,9 +27,8 @@ class PermissionGuideActivity : BaseViewBindingActivity<ActivityPermissionGuideB
|
||||
override fun onClick(v: View?) {
|
||||
when (v?.id) {
|
||||
R.id.tv_system_permission -> GrantedPermissionsActivity.start(this)
|
||||
R.id.tv_jump_setting -> PermissionUtil.instance.jumpToSetting(this)
|
||||
R.id.tv_privacy_guide -> CommonWebViewActivity.start(
|
||||
this,UriProvider.getPrivacyUrl()
|
||||
this, UriProvider.getPrivacyUrl()
|
||||
)
|
||||
R.id.tv_sdk_permission -> CommonWebViewActivity.start(
|
||||
this,
|
||||
@@ -48,6 +42,26 @@ class PermissionGuideActivity : BaseViewBindingActivity<ActivityPermissionGuideB
|
||||
this,
|
||||
UriProvider.getPersonalInfoUrl()
|
||||
)
|
||||
R.id.tv_charge_agreement -> CommonWebViewActivity.start(
|
||||
this,
|
||||
UriProvider.getChargeAgreementUrl()
|
||||
)
|
||||
R.id.tv_registration_agreement -> CommonWebViewActivity.start(
|
||||
this,
|
||||
UriProvider.getRegistrationAgreementUrl()
|
||||
)
|
||||
R.id.tv_live_service_agreement -> CommonWebViewActivity.start(
|
||||
this,
|
||||
UriProvider.getLiveServiceAgreementUrl()
|
||||
)
|
||||
R.id.tv_community_specification -> CommonWebViewActivity.start(
|
||||
this,
|
||||
UriProvider.getCommunitySpecificationUrl()
|
||||
)
|
||||
R.id.tv_cancellation_agreement -> CommonWebViewActivity.start(
|
||||
this,
|
||||
UriProvider.getCancellationAgreementUrl()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,124 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="android.view.View.OnClickListener" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/color_transparent10_0A333333" />
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/color_transparent10_0A333333" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar"
|
||||
android:id="@+id/tv_system_permission"
|
||||
style="@style/permission_text_style"
|
||||
android:text="系统权限管理"
|
||||
android:onClick="@{click}"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar"
|
||||
android:id="@+id/tv_privacy_guide"
|
||||
style="@style/permission_text_style"
|
||||
android:text="隐私保护指引"
|
||||
android:onClick="@{click}"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar"
|
||||
android:id="@+id/tv_sdk_permission"
|
||||
style="@style/permission_text_style"
|
||||
android:text="第三方SDK目录"
|
||||
android:onClick="@{click}"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar"
|
||||
android:id="@+id/tv_personal_permission"
|
||||
style="@style/permission_text_style"
|
||||
android:text="个人信息收集清单"
|
||||
android:onClick="@{click}"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar"
|
||||
android:id="@+id/tv_device_permission"
|
||||
style="@style/permission_text_style"
|
||||
android:text="设备权限清单"
|
||||
android:onClick="@{click}"
|
||||
tools:ignore="MissingConstraints" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_jump_setting"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_60"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:onClick="@{click}"
|
||||
android:text="前往系统设置>"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textColor="#7154EE"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tip"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="jumpToSystemSetting"
|
||||
android:text="仅展示能查询到的已授权系统权限"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
android:textColor="@color/color_999999"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_jump_setting"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_system_permission"
|
||||
style="@style/permission_text_style"
|
||||
android:onClick="@{click}"
|
||||
android:text="系统权限管理"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/color_grey_999999"
|
||||
app:layout_constraintRight_toLeftOf="@id/tv_tip"
|
||||
android:layout_marginRight="@dimen/dp_8"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_tip"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_tip"
|
||||
/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_privacy_guide"
|
||||
style="@style/permission_text_style"
|
||||
android:onClick="@{click}"
|
||||
android:text="隐私保护指引"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<View
|
||||
app:layout_constraintTop_toTopOf="@id/tv_tip"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_tip"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="0.5dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/tv_tip"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/color_grey_999999"
|
||||
/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_sdk_permission"
|
||||
style="@style/permission_text_style"
|
||||
android:onClick="@{click}"
|
||||
android:text="第三方SDK目录"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_personal_permission"
|
||||
style="@style/permission_text_style"
|
||||
android:onClick="@{click}"
|
||||
android:text="个人信息收集清单"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_device_permission"
|
||||
style="@style/permission_text_style"
|
||||
android:onClick="@{click}"
|
||||
android:text="设备权限清单"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_charge_agreement"
|
||||
style="@style/permission_text_style"
|
||||
android:onClick="@{click}"
|
||||
android:text="用户充值协议"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_registration_agreement"
|
||||
style="@style/permission_text_style"
|
||||
android:onClick="@{click}"
|
||||
android:text="用户注册服务协议"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_live_service_agreement"
|
||||
style="@style/permission_text_style"
|
||||
android:onClick="@{click}"
|
||||
android:text="直播服务协议"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_community_specification"
|
||||
style="@style/permission_text_style"
|
||||
android:onClick="@{click}"
|
||||
android:text="社区规范"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_cancellation_agreement"
|
||||
style="@style/permission_text_style"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:onClick="@{click}"
|
||||
android:text="账号注销协议"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
@@ -393,4 +393,39 @@ public class UriProvider {
|
||||
public static String getCpDecorationUrl() {
|
||||
return JAVA_WEB_URL.concat("/yinyou/activity/act-nameplate-cp/index.html");
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户充值协议
|
||||
*/
|
||||
public static String getChargeAgreementUrl() {
|
||||
return JAVA_WEB_URL.concat("/yinyou/modules/rule/rechargeAgreement.html");
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户注册服务协议
|
||||
*/
|
||||
public static String getRegistrationAgreementUrl() {
|
||||
return JAVA_WEB_URL.concat("/yinyou/modules/rule/protocol.html");
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播服务协议
|
||||
*/
|
||||
public static String getLiveServiceAgreementUrl() {
|
||||
return JAVA_WEB_URL.concat("/yinyou/modules/rule/live-protocol.html");
|
||||
}
|
||||
|
||||
/**
|
||||
* 社区规范
|
||||
*/
|
||||
public static String getCommunitySpecificationUrl() {
|
||||
return JAVA_WEB_URL.concat("/yinyou/modules/rule/community-norms.html");
|
||||
}
|
||||
|
||||
/**
|
||||
* 账号注销协议
|
||||
*/
|
||||
public static String getCancellationAgreementUrl() {
|
||||
return JAVA_WEB_URL.concat("/yinyou/modules/rule/logout-agreement.html");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user