Beispiel #1
0
        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);


            //设置操作
            var img_setting = View.FindViewById <ImageView> (Resource.Id.img_setting);

            img_setting.Click += (sender, e) =>
            {
                Activity.StartActivity(typeof(SetActivity));
                Activity.OverridePendingTransition(Android.Resource.Animation.FadeIn, Android.Resource.Animation.FadeOut);
            };
            img_head = View.FindViewById <ImageView> (Resource.Id.img_head);

            //设置个人头像信息
            img_head.Click += (sender, e) =>
            {
                if (picPopWindow == null)
                {
                    picPopWindow = new SelectPicPopWindow(Activity, this);
                }
                picPopWindow.ShowPopWindow(View.FindViewById <LinearLayout>(Resource.Id.ll_person));
            };

            tv_nickName    = View.FindViewById <TextView> (Resource.Id.tv_nickName);
            tv_phonenumber = View.FindViewById <TextView> (Resource.Id.tv_phonenumber);

            //个人资料
            var rl_person_basic = View.FindViewById <RelativeLayout> (Resource.Id.rl_person_basic);

            rl_person_basic.Click += (sender, e) =>
            {
                Activity.StartActivity(typeof(PersonInfoActivity));
                Activity.OverridePendingTransition(Android.Resource.Animation.SlideInLeft, Android.Resource.Animation.SlideOutRight);
            };
            //账户安全
            var rl_person_accountSecurity = View.FindViewById <RelativeLayout> (Resource.Id.rl_person_accountSecurity);

            rl_person_accountSecurity.Click += (sender, e) =>
            {
                Activity.StartActivity(typeof(AccountSecurityActivity));
                Activity.OverridePendingTransition(Android.Resource.Animation.SlideInLeft, Android.Resource.Animation.SlideOutRight);
            };
            //投诉建议
            var rl_person_advice = View.FindViewById <RelativeLayout> (Resource.Id.rl_person_advice);

            rl_person_advice.Click += (sender, e) =>
            {
                Activity.StartActivity(typeof(AdviceActivity));
                Activity.OverridePendingTransition(Android.Resource.Animation.SlideInLeft, Android.Resource.Animation.SlideOutRight);
            };
            //拨打电话
            var tv_customPhone = View.FindViewById <TextView>(Resource.Id.tv_customPhone);
            var customPhoneNum = tv_customPhone.Text;            //客服电话
            var img_callCustom = View.FindViewById <ImageView> (Resource.Id.img_callCustom);

            img_callCustom.Click += (sender, e) =>
            {
                Intent intent = new Intent(Intent.ActionCall, Android.Net.Uri.Parse("tel:" + customPhoneNum));
                Activity.StartActivity(intent);
            };

            SetShowInfo();
        }
        public override void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);
            ll_userInfo       = View.FindViewById <LinearLayout> (Resource.Id.ll_userInfo);
            ll_login_register = View.FindViewById <LinearLayout>(Resource.Id.ll_login_register);

            if (EldYoungUtil.HasLogin)
            {
                ll_userInfo.Visibility       = ViewStates.Visible;
                ll_login_register.Visibility = ViewStates.Invisible;
            }
            else
            {
                ll_userInfo.Visibility       = ViewStates.Gone;
                ll_login_register.Visibility = ViewStates.Invisible;
            }

            //点击注册登录界面
            ll_login_register.Click += (object sender, EventArgs e) =>
            {
                EldYoungUtil.StartTargetActivity(Activity, FuncActivityType.Main);
            };

            //设置操作
            var img_setting = View.FindViewById <ImageView> (Resource.Id.img_setting);

            img_setting.Click += (sender, e) =>
            {
                Activity.StartActivity(typeof(SettingActivity));
                Activity.OverridePendingTransition(Android.Resource.Animation.FadeIn, Android.Resource.Animation.FadeOut);
            };
            img_head = View.FindViewById <ImageView> (Resource.Id.img_head);

            //设置个人头像信息
            img_head.Click += (sender, e) =>
            {
                if (EldYoungUtil.HasLogin)
                {
                    if (picPopWindow == null)
                    {
                        picPopWindow = new SelectPicPopWindow(Activity, this);
                    }
                    picPopWindow.ShowPopWindow(View.FindViewById <LinearLayout>(Resource.Id.ll_person));
                }
            };

            tv_nickName    = View.FindViewById <TextView> (Resource.Id.tv_nickName);
            tv_phonenumber = View.FindViewById <TextView> (Resource.Id.tv_phonenumber);

            //个人资料
            var rl_person_basic = View.FindViewById <RelativeLayout> (Resource.Id.rl_person_basic);

            rl_person_basic.Click += (sender, e) =>
            {
                EldYoungUtil.StartTargetActivity(Activity, FuncActivityType.PersonInfo);
            };
            //账户安全
            var rl_person_accountSecurity = View.FindViewById <RelativeLayout> (Resource.Id.rl_person_accountSecurity);

            rl_person_accountSecurity.Click += (sender, e) =>
            {
                EldYoungUtil.StartTargetActivity(Activity, FuncActivityType.AccountSecurity);
            };
            //证书
            var rl_person_certificate = View.FindViewById <RelativeLayout>(Resource.Id.rl_person_certificate);

            rl_person_certificate.Click += (object sender, EventArgs e) =>
            {
                EldYoungUtil.StartTargetActivity(Activity, FuncActivityType.Certificate);
            };
            //投诉建议
            var rl_person_advice = View.FindViewById <RelativeLayout> (Resource.Id.rl_person_advice);

            rl_person_advice.Click += (sender, e) =>
            {
                EldYoungUtil.StartTargetActivity(Activity, FuncActivityType.Advice);
            };
            //拨打电话
            var tv_customPhone = View.FindViewById <TextView>(Resource.Id.tv_customPhone);
            var customPhoneNum = tv_customPhone.Text;            //客服电话
            var img_callCustom = View.FindViewById <ImageView> (Resource.Id.img_callCustom);

            img_callCustom.Click += (sender, e) =>
            {
                Intent intent = new Intent(Intent.ActionCall, Android.Net.Uri.Parse("tel:" + customPhoneNum));
                Activity.StartActivity(intent);
            };
            //设置下拉刷新动画
            pull_refresh_scroll_my = View.FindViewById <PullToRefreshScrollView> (Resource.Id.pull_refresh_scroll_my);
            //设置可以上拉加载。下拉刷新
            pull_refresh_scroll_my.Mode = PullToRefreshBase.PullToRefreshMode.PullFromStart;
            //下拉刷新提示文本
            pull_refresh_scroll_my.GetLoadingLayoutProxy(true, false).SetPullLabel(GetString(Resource.String.pullDownLbl));
            pull_refresh_scroll_my.GetLoadingLayoutProxy(true, false).SetRefreshingLabel(GetString(Resource.String.pullDownRefreshLbl));
            pull_refresh_scroll_my.GetLoadingLayoutProxy(true, false).SetReleaseLabel(GetString(Resource.String.pullDownReleaseLbl));
            //绑定监听事件
            pull_refresh_scroll_my.SetOnRefreshListener(this);
            //第一次进入且当guid不为空设置自动刷新view
            new Handler().PostDelayed(() => {
                if (EldYoungUtil.HasLogin)
                {
                    pull_refresh_scroll_my.Refreshing = true;
                }
            }, 500);
        }