Hello I'm trying to use both
builder.AddConnectionCallbacks(this);
and
mGoogleSignIn.Click += mGoogleSignIn_Click;
However, mGoogleSignIn_Click are both giving me trouble.
builder.AddConnectionCallbacks(this); states it can't be inside of MainActivity due to (this) and mGoogleSignIn_Click states it does not exist in current context. I'm using Visual Studio 2015, Android App.
public class MainActivity : Activity
{
private Button mBtnSignUp;
private ProgressBar mProgressBar;
private GoogleApiClient mGoogleApiClient;
private SignInButton mGoogleSignIn;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
mGoogleSignIn = FindViewById<SignInButton>(Resource.Id.sign_in_button);
mGoogleSignIn.Click += mGoogleSignIn_Click;
GoogleApiClient.Builder builder = new GoogleApiClient.Builder(this);
builder.AddConnectionCallbacks(this);
mBtnSignUp = FindViewById<Button>(Resource.Id.btnSignUp);
mProgressBar = FindViewById<ProgressBar>(Resource.Id.progressBar1);
mBtnSignUp.Click += (object sender, EventArgs args) =>
{
//Pull up dialog
FragmentTransaction transaction = FragmentManager.BeginTransaction();
dialog_SignUp signUpDialog = new dialog_SignUp();
signUpDialog.Show(transaction, "dialog fragment");
signUpDialog.mOnSignUpComplete += signUpDialog_mOnSignUpComplete;
};
}
void mGoogleSighIn_Click(object sender, EventArgs e)
{
//Fire
}
Aucun commentaire:
Enregistrer un commentaire