コード例 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.timelineMain);


            suite     = new Suite();
            item      = new Item();
            component = new Component();
            defect    = new Defect();
            suite     = JsonConvert.DeserializeObject <Suite>(Intent.GetStringExtra("SuiteObj"));
            item      = JsonConvert.DeserializeObject <Item>(Intent.GetStringExtra("ItemObj"));
            component = JsonConvert.DeserializeObject <Component>(Intent.GetStringExtra("ComponentObj"));
            defect    = JsonConvert.DeserializeObject <Defect>(Intent.GetStringExtra("DefectObj"));


            btnDetails = (ImageButton)FindViewById(Resource.Id.imageButtonDetails);
            btnImage   = (ImageButton)FindViewById(Resource.Id.imageButtonImage);

            fragmentTransaction = FragmentManager.BeginTransaction();
            fragmentTransaction.Replace(Resource.Id.container, TimelineFragment.NewInstance(suite, item, component, defect));
            fragmentTransaction.Commit();
            isTimelineDetailLoaded = true;
            btnDetails.Click      += Details_Click;
            btnImage.Click        += BtnImage_Click;
        }
コード例 #2
0
 private void Details_Click(object sender, EventArgs e)
 {
     if (isTimelineDetailLoaded == false)
     {
         isTimelineDetailLoaded = true;
         fragmentTransaction    = FragmentManager.BeginTransaction();
         fragmentTransaction.Replace(Resource.Id.container, TimelineFragment.NewInstance(suite, item, component, defect));
         fragmentTransaction.Commit();
     }
 }
コード例 #3
0
        public static TimelineFragment NewInstance(Suite suite, Item item, Component component, Defect defect)//accept objet
        {
            TimelineFragment fragmentTimeline = new TimelineFragment
            {
                suite     = suite,
                item      = item,
                component = component,
                defect    = defect
            };

            return(fragmentTimeline);
        }