1.在登录或引导页面添加 “已阅读和同意用户使用协议和隐私政策”
2.点击用户使用协议或隐私政策时,显示dialog弹窗
String str = initAssets("yszc.txt");
final View inflate = LayoutInflater.from(mActivity).inflate(R.layout.dialog_xieyi_yinsi_style, null);
TextView tv_title = (TextView) inflate.findViewById(R.id.tv_title);
tv_title.setText("隐私政策");
TextView tv_content = (TextView) inflate.findViewById(R.id.tv_content);
tv_content.setText(str);
final Dialog dialog = new AlertDialog
.Builder(mActivity)
.setView(inflate)
.show();
final WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
params.width = 800;
params.height = 1200;
dialog.getWindow().setAttributes(params);
dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
3.将隐私政策yszc.txt和用户使用协议yhsyxy.txt的文本放在ass