|
@@ -1,12 +1,16 @@
|
|
|
package com.ynstkz.shitu.android.activity;
|
|
|
|
|
|
+import android.app.Dialog;
|
|
|
import android.app.ProgressDialog;
|
|
|
import android.content.Intent;
|
|
|
+import android.net.Uri;
|
|
|
import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
|
import android.support.annotation.Nullable;
|
|
|
import android.text.TextUtils;
|
|
|
+import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
+import android.view.ViewGroup;
|
|
|
import android.widget.Button;
|
|
|
import android.widget.EditText;
|
|
|
import android.widget.ImageView;
|
|
@@ -295,27 +299,39 @@ public class LoginActivity extends TitleBarActivity {
|
|
|
* 完善用户信息
|
|
|
*/
|
|
|
private void completeUserInfo(final String thirdId, final String thirdType, final String name, final String iconurl){
|
|
|
- final MaterialDialog dialog = new MaterialDialog(this);
|
|
|
- dialog.setTitle("提示");
|
|
|
- dialog.setMessage("请完善用户信息");
|
|
|
- dialog.setPositiveButton("确定", new View.OnClickListener() {
|
|
|
+ final Dialog dialog = new Dialog(this);
|
|
|
+ View view = LayoutInflater.from(this).inflate(R.layout.view_phone_server, null);
|
|
|
+ dialog.setContentView(view);
|
|
|
+ dialog.getWindow().setLayout((int)(PixelUtil.getScreenWidth(this) * 0.9), ViewGroup.LayoutParams.WRAP_CONTENT);
|
|
|
+ dialog.show();
|
|
|
+
|
|
|
+ TextView dialogTitle = view.findViewById(R.id.tv_dialog_title);
|
|
|
+ TextView dialogMsg = view.findViewById(R.id.tv_dialog_msg);
|
|
|
+ TextView dialogCancle = view.findViewById(R.id.tv_dialog_cancle);
|
|
|
+ TextView dialogSure = view.findViewById(R.id.tv_dialog_sure);
|
|
|
+
|
|
|
+ dialogTitle.setText("提示");
|
|
|
+ dialogMsg.setText("请完善个人信息");
|
|
|
+ dialogCancle.setText("取消");
|
|
|
+ dialogSure.setText("确认");
|
|
|
+
|
|
|
+ dialogCancle.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
|
- Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);
|
|
|
- intent.putExtra("thirdId", thirdId);
|
|
|
- intent.putExtra("thirdType", thirdType);
|
|
|
- startActivity(intent);
|
|
|
+ thirdRegist(thirdType, thirdId, iconurl, name);
|
|
|
dialog.dismiss();
|
|
|
}
|
|
|
});
|
|
|
- dialog.setNegativeButton("取消", new View.OnClickListener() {
|
|
|
+ dialogSure.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
|
- thirdRegist(thirdType, thirdId, iconurl, name);
|
|
|
+ Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);
|
|
|
+ intent.putExtra("thirdId", thirdId);
|
|
|
+ intent.putExtra("thirdType", thirdType);
|
|
|
+ startActivity(intent);
|
|
|
dialog.dismiss();
|
|
|
}
|
|
|
});
|
|
|
- dialog.show();
|
|
|
}
|
|
|
|
|
|
|