public override void OnActivityCreated (Bundle savedInstanceState) { base.OnActivityCreated (savedInstanceState); //radiogroup radio_advice_Group = View.FindViewById<RadioGroup> (Resource.Id.radio_advice_Group); radio_advice_Group.SetOnCheckedChangeListener (this); //radiobutton rbtn_zixun = View.FindViewById<RadioButton> (Resource.Id.rbtn_zixun); rbtn_zixun.Tag = ((int)AdviceType.Consult).ToString(); //默认咨询选中 rbtn_zixun.Checked = true; rbtn_jianyi = View.FindViewById<RadioButton> (Resource.Id.rbtn_jianyi); rbtn_jianyi.Tag =((int)AdviceType.Suggest).ToString (); rbtn_tousu = View.FindViewById<RadioButton> (Resource.Id.rbtn_tousu); rbtn_tousu.Tag = ((int)AdviceType.Complain).ToString (); rbtn_other = View.FindViewById<RadioButton> (Resource.Id.rbtn_other); rbtn_other.Tag = ((int)AdviceType.Other).ToString(); edit_advice_title = View.FindViewById<EditText> (Resource.Id.edit_advice_title); edit_advice_content = View.FindViewById<EditText> (Resource.Id.edit_advice_content); //发表按钮 btn_Publish = View.FindViewById<Button> (Resource.Id.btn_Publish); btn_Publish.Click += (sender, e) => { PublishAdvice(); }; //初始化view完成 IsPrepared = true; LasyloadData (); }
public override void OnActivityCreated (Bundle savedInstanceState) { base.OnActivityCreated (savedInstanceState); //radiogroup radio_advice_Group = View.FindViewById<RadioGroup> (Resource.Id.radio_advice_Group); radio_advice_Group.SetOnCheckedChangeListener (this); //radiobutton rbtn_all = View.FindViewById<RadioButton>(Resource.Id.rbtn_all); rbtn_all.Tag = ((int)AdviceType.All).ToString(); //默认咨询选中 rbtn_all.Checked = true; rbtn_zixun = View.FindViewById<RadioButton> (Resource.Id.rbtn_zixun); rbtn_zixun.Tag = ((int)AdviceType.Consult).ToString(); rbtn_jianyi = View.FindViewById<RadioButton> (Resource.Id.rbtn_jianyi); rbtn_jianyi.Tag = ((int)AdviceType.Suggest).ToString(); rbtn_tousu = View.FindViewById<RadioButton> (Resource.Id.rbtn_tousu); rbtn_tousu.Tag = ((int)AdviceType.Complain).ToString(); rbtn_other = View.FindViewById<RadioButton> (Resource.Id.rbtn_other); rbtn_other.Tag = ((int)AdviceType.Other).ToString(); tv_recordNum = View.FindViewById<TextView> (Resource.Id.tv_recordNum); //pulltolistview lv_recordAdviceRefreshListView = View.FindViewById<PullToRefreshListView> (Resource.Id.lv_recordAdvice); actualListView = (ListView)lv_recordAdviceRefreshListView.RefreshableView; //设置可以上拉加载。下拉刷新 lv_recordAdviceRefreshListView.Mode = PullToRefreshBase.PullToRefreshMode.Both; //下拉刷新提示文本 lv_recordAdviceRefreshListView.GetLoadingLayoutProxy(true,false).SetPullLabel(GetString(Resource.String.pullDownLbl)); lv_recordAdviceRefreshListView.GetLoadingLayoutProxy (true,false).SetRefreshingLabel(GetString(Resource.String.pullDownRefreshLbl)); lv_recordAdviceRefreshListView.GetLoadingLayoutProxy (true, false).SetReleaseLabel (GetString(Resource.String.pullDownReleaseLbl)); //上拉加载提示文本 lv_recordAdviceRefreshListView.GetLoadingLayoutProxy(false,true).SetPullLabel(GetString(Resource.String.pullUpLbl)); lv_recordAdviceRefreshListView.GetLoadingLayoutProxy (false, true).SetRefreshingLabel (GetString(Resource.String.pullUpRefreshLbl)); lv_recordAdviceRefreshListView.GetLoadingLayoutProxy (false, true).SetReleaseLabel (GetString(Resource.String.pullUpReleaseLbl)); //绑定监听事件 lv_recordAdviceRefreshListView.SetOnRefreshListener (this); //设置adapter adviceRecordListAdapter = new AdviceRecordListAdapter (Activity); actualListView.Adapter = adviceRecordListAdapter; //初始化请求参数信息 adviceRecordInfoListParam = new AdviceRecordInfoListParam () { UId = Global.Guid, AdviceType = _adviceType }; //初始化view完成 IsPrepared = true; LasyloadData (); }
private OnRgsExtraCheckedChangedListener onRgsExtraCheckedChangedListener; // 用于让调用者在切换tab时候增加新的功能 public FragmentTabAdapter(FragmentActivity fragmentActivity, List<Fragment> fragments, int fragmentContentId, RadioGroup rgs) { this.fragments = fragments; this.rgs = rgs; this.fragmentactivity = fragmentActivity; this.fragmentcontentid = fragmentContentId; // 默认显示第一页 FragmentTransaction ft = fragmentActivity.SupportFragmentManager.BeginTransaction(); ft.Add(fragmentContentId, fragments[0]); ft.Commit(); rgs.SetOnCheckedChangeListener(this); }
protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); // Set our view from the "main" layout resource SetContentView (Resource.Layout.Main); mLocationClient = ((LocationApplication)Application).mLocationClient; LocationResult = (TextView)FindViewById(Resource.Id.textView1); ModeInfor= (TextView)FindViewById(Resource.Id.modeinfor); ModeInfor.Text=Resources.GetString(Resource.String.hight_accuracy_desc); ((LocationApplication)Application).mLocationResult = LocationResult; frequence = (EditText)FindViewById(Resource.Id.frequence); checkGeoLocation = (CheckBox)FindViewById(Resource.Id.geolocation); startLocation = (Button)FindViewById(Resource.Id.addfence); startLocation.Click += StartLocation_Clicked; selectMode = (RadioGroup)FindViewById(Resource.Id.selectMode); selectCoordinates= (RadioGroup)FindViewById(Resource.Id.selectCoordinates); selectMode.SetOnCheckedChangeListener (this); selectCoordinates.CheckedChange+= Select_CheckedChanged ; }