Esempio n. 1
0
        public static void toastNegativePositiveDialog(Context context, String title, String msg, int flag)
        {
            AlertDialog.Builder ab = new AlertDialog.Builder(context);
            ab.SetTitle(title);
            ab.SetMessage(msg);
            ab.SetPositiveButton("Confirm", delegate(object sender, DialogClickEventArgs e) {
                switch (flag)
                {
                case Constants.EXIT_CHOICE:
                    HomeActivity home = context as HomeActivity;
                    //delete the token
                    UserUtil.LogOutUserByTokenAsync(home.token);
                    home.StartActivity(new Intent(home, typeof(LoginActivity)));
                    home.Finish();
                    break;

                case Constants.RETURN_LIST_NEG:
                    //enter into homeactivity
                    ScreensActivity video = context as ScreensActivity;
                    video.StartActivity(new Intent(video, typeof(HomeActivity)));
                    video.Finish();
                    break;

                case Constants.SUBMIT_ANSWERS:
                    //jump to result activity
                    ScreensActivity screenactivity = context as ScreensActivity;
                    screenactivity.submit();
                    break;

                default:
                    break;
                }
            });
            ab.SetNegativeButton("Cancel", delegate(object sender, DialogClickEventArgs e) {
            });
            ab.Create().Show();
        }
Esempio n. 2
0
 public MenuListViewAdapter(HomeActivity activity)
 {
     this.activity = activity;
 }
Esempio n. 3
0
 public MyPagerAdapter(HomeActivity activity)
 {
     hactivity = activity;
 }