Пример #1
0
        public RecentListAdapter (Context ctx, Activity activity)
        {
            Inflater = LayoutInflater.FromContext (ctx);
            Activity = (MainActivity)activity;
            Context = ctx;

            Activity.CollectionChanged += OnCollectionChanged;
        }
Пример #2
0
        public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate (Resource.Layout.TimeEntryFragment, container, false);

            ActionButton = view.FindViewById<ImageButton> (Resource.Id.testButton);
            DurationTextView = view.FindViewById<TextView> (Resource.Id.DurationTextView);
            DescriptionTextView = view.FindViewById<TextView> (Resource.Id.DescriptionTextView);
            ProjectTextView = view.FindViewById<TextView> (Resource.Id.ProjectTextView);
            ProgressBar = view.FindViewById<ProgressBar> (Resource.Id.TimerProgressBar);

            ActionButton.Click += OnActionButtonClicked;

            activity = ((MainActivity)Activity);
            context = Activity.ApplicationContext;

            Rebind ();

            return view;
        }