Hello i am trying to build a app using google sdk, i want to display the profile name in other activity where i have EditText. For example :- GoogleActivity.java to UserInformation.java
i have successfully created google login so now i want to fetch profile name from GoogleActivity.java and want to display in UserInformation.java Here is my code for USerInformation.java
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_signin);
signInToolbar = (Toolbar) findViewById(R.id.toolbar_signin);
setSupportActionBar(signInToolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
signInToolbar.setNavigationIcon(R.drawable.back_arrow);
OtpVerify = (TextView) findViewById(R.id.OtpVerification);
editTextUsername = (EditText) findViewById(R.id.editTextName);
editTextEmail = (EditText) findViewById(R.id.editTextEmail);
signInToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
getSupportActionBar().setTitle(Html.fromHtml("<font color='#FFFFFF'>Sign Up</font>"));
OtpVerify.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
OtpVerification();
}
});
}
private void OtpVerification() {
LayoutInflater inflater = getLayoutInflater();
View OtpDialongScreen = inflater.inflate(R.layout.otpverification, null);
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setView(OtpDialongScreen);
alert.setCancelable(false);
final AlertDialog dialog = alert.create();
dialog.show();
}
}
can anyone help me to display the profile name in EditText