protected override void InitializeViews()
        {
            summaryCard                    = ItemView.FindViewById <CardView>(Resource.Id.SummaryCard);
            reportsSummaryTotal            = ItemView.FindViewById <TextView>(Resource.Id.ReportsSummaryTotal);
            reportsSummaryTotalLabel       = ItemView.FindViewById <TextView>(Resource.Id.ReportsSummaryTotalLabel);
            reportsTotalChartImageView     = ItemView.FindViewById <ImageView>(Resource.Id.ReportsTotalChartImageView);
            reportsTotalChartImageDrawable = reportsTotalChartImageView.Drawable;
            reportsSummaryBillable         = ItemView.FindViewById <TextView>(Resource.Id.ReportsSummaryBillable);
            reportsSummaryBillableLabel    = ItemView.FindViewById <TextView>(Resource.Id.ReportsSummaryBillableLabel);
            billablePercentageView         = ItemView.FindViewById(Resource.Id.BillablePercentageView);
            clockedHoursLabel              = ItemView.FindViewById <TextView>(Resource.Id.ClockedHours);
            billableTextLabel              = ItemView.FindViewById <TextView>(Resource.Id.BillableText);
            nonBillableTextLabel           = ItemView.FindViewById <TextView>(Resource.Id.NonBillableText);
            pieChartCard                   = ItemView.FindViewById <CardView>(Resource.Id.PieChartCard);
            pieChartView                   = ItemView.FindViewById <PieChartView>(Resource.Id.PieChartView);
            emptyStateView                 = ItemView.FindViewById <LinearLayout>(Resource.Id.EmptyStateView);
            emptyStateTitle                = ItemView.FindViewById <TextView>(Resource.Id.EmptyStateTitle);
            emptyStateMessage              = ItemView.FindViewById <TextView>(Resource.Id.EmptyStateMessage);

            summaryCard.Click += hideCalendar;

            reportsSummaryTotalLabel.Text    = Shared.Resources.Total;
            reportsSummaryBillableLabel.Text = Shared.Resources.Billable;
            clockedHoursLabel.Text           = Shared.Resources.ClockedHours;
            billableTextLabel.Text           = Shared.Resources.Billable;
            nonBillableTextLabel.Text        = Shared.Resources.NonBillable;
            emptyStateTitle.Text             = Shared.Resources.ReportsEmptyStateTitle;
            emptyStateMessage.Text           = Shared.Resources.ReportsEmptyStateDescription;
        }
Пример #2
0
 protected override void InitializeViews()
 {
     taskLabel        = ItemView.FindViewById <TextView>(TaskLabel);
     projectLabel     = ItemView.FindViewById <TextView>(ProjectLabel);
     clientNameLabel  = ItemView.FindViewById <TextView>(ClientNameLabel);
     descriptionLabel = ItemView.FindViewById <TextView>(DescriptionLabel);
 }
Пример #3
0
 public NewsItemViewHolder(View itemview) : base(itemview)
 {
     Image    = ItemView.FindViewById <ImageView>(Resource.Id.image_id);
     Date     = ItemView.FindViewById <TextView>(Resource.Id.date);
     Headline = itemview.FindViewById <TextView>(Resource.Id.headline);
     Preamble = itemview.FindViewById <TextView>(Resource.Id.preamble);
 }
Пример #4
0
 public Customer_Outlet_Service_ViewModel_ViewHolder(View itemview, Action <int> listener) : base(itemview)
 {
     ServiceImg      = ItemView.FindViewById <ImageView>(Resource.Id.imgService_ItemService_Outlet_Customer);
     ServiceName     = ItemView.FindViewById <TextView>(Resource.Id.txtNameService_ItemService_Outlet_Customer);
     ServicePrice    = ItemView.FindViewById <TextView>(Resource.Id.txtPriceService_ItemService_Outlet_Customer);
     itemview.Click += (sender, e) => listener(base.Position);
 }
Пример #5
0
        private void initializeIfNeeded()
        {
            if (initialized)
            {
                return;
            }

            hintTextView      = ItemView.FindViewById <TextView>(Resource.Id.SuggestionsHintTextView);
            indicatorTextView = ItemView.FindViewById <TextView>(Resource.Id.SuggestionsIndicatorTextView);

            countDisposable =
                Observable.FromEventPattern <NotifyCollectionChangedEventHandler, NotifyCollectionChangedEventArgs>(
                    e => ViewModel.Suggestions.CollectionChanged += e,
                    e => ViewModel.Suggestions.CollectionChanged -= e)
                .Select(args => ViewModel.Suggestions.Count)
                .StartWith(ViewModel.Suggestions.Count)
                .DistinctUntilChanged()
                .Subscribe(onCollectionCountChanged);

            currentCardDisposable =
                ItemView.FindViewById <SuggestionsRecyclerView>(Resource.Id.SuggestionsRecyclerView)
                .CurrentIndexObservable.Subscribe(onCurrentSuggestionIndexChanged);

            initialized = true;
        }
Пример #6
0
        /// <summary>
        /// Devuelve el View que muestra los datos de un elemento del conjunto de datos.
        /// </summary>
        /// <param name="position">Posición del elemento a mostrar.</param>
        /// <param name="convertView">View anterior que puede ser reutilizada.</param>
        /// <param name="parent">View padre al que podria adjuntarse el View devuelto.</param>
        /// <returns></returns>
        public override View GetView(int position, View convertView, ViewGroup parent)
        {
            // Obtenemos el elemento del cual se requiere la Vista
            var Item = Items[position];

            View ItemView; // Vista que vamos a devolver

            if (convertView == null)
            {
                // No hay vista reutilizable, crear una nueva
                ItemView = Context.LayoutInflater.Inflate(ItemLayoutTemplate, null /* No hay View padre*/);
            }
            else
            {
                // Reutilizamos un View existente para ahorrar recursos
                ItemView = convertView;
            }

            // Establecemos los datos del elemento dentro del View
            ItemView.FindViewById <TextView>(EvidenceTitleViewID).Text = Item.Title;

            ItemView.FindViewById <TextView>(EvidenceStatusViewID).Text = Item.Status;

            return(ItemView);
        }
Пример #7
0
        public override View GetView(int position, View convertView, ViewGroup parent)
        {
            var  Item = GamesList[position];
            View ItemView;

            if (convertView == null)
            {
                ItemView = Context.LayoutInflater.Inflate(ItemLayoutTemplate, null);
            }
            else
            {
                ItemView = convertView;
            }

            ItemView.FindViewById <TextView>(GameTitle).Text    = Item.name;
            ItemView.FindViewById <TextView>(GamePlatform).Text = Item.id.ToString();
            if (Item.cover != null)
            {
                Picasso.With(Context).Load(string.Format("https://images.igdb.com/igdb/image/upload/t_thumb/{0}.jpg", Item.cover.cloudinary_id)).Into(ItemView.FindViewById <ImageView>(GamePreview));
            }
            else
            {
                Picasso.With(Context).Load("https://lh3.googleusercontent.com/XO8m2QiuEU3hHIHcWlS29XxUhnMXj3fU_hU8WbR100-57ypK5A_6RNIXPOdYu-EyNVRS").Into(ItemView.FindViewById <ImageView>(GamePreview));
            }
            return(ItemView);
        }
Пример #8
0
        protected override void InitializeViews()
        {
            cardColor       = ItemView.Context.SafeGetColor(Resource.Color.cardBackground);
            backgroundColor = ItemView.Context.SafeGetColor(Resource.Color.background);

            groupItemBackground = ItemView.FindViewById <View>(MainLogGroupBackground);
            groupCountTextView  = ItemView.FindViewById <TextView>(TimeEntriesLogCellGroupCount);

            timeEntriesLogCellDescription         = ItemView.FindViewById <TextView>(TimeEntriesLogCellDescription);
            addDescriptionLabel                   = ItemView.FindViewById <TextView>(AddDescriptionLabel);
            timeEntriesLogCellProjectLabel        = ItemView.FindViewById <TextView>(TimeEntriesLogCellProjectLabel);
            timeEntriesLogCellDuration            = ItemView.FindViewById <TextView>(TimeEntriesLogCellDuration);
            timeEntriesLogCellProjectArchivedIcon = ItemView.FindViewById <ImageView>(TimeEntriesLogCellProjectArchivedIcon);
            timeEntriesLogCellContinueImage       = ItemView.FindViewById(TimeEntriesLogCellContinueImage);
            errorImageView = ItemView.FindViewById(ErrorImageView);
            errorNeedsSync = ItemView.FindViewById(ErrorNeedsSync);
            timeEntriesLogCellContinueButton = ItemView.FindViewById(TimeEntriesLogCellContinueButton);
            mainLogBackgroundContinue        = ItemView.FindViewById <TextView>(MainLogBackgroundContinue);
            mainLogBackgroundDelete          = ItemView.FindViewById <TextView>(MainLogBackgroundDelete);
            billableIcon         = ItemView.FindViewById(TimeEntriesLogCellBillable);
            hasTagsIcon          = ItemView.FindViewById(TimeEntriesLogCellTags);
            durationPadding      = ItemView.FindViewById(TimeEntriesLogCellDurationPaddingArea);
            durationFadeGradient = ItemView.FindViewById(TimeEntriesLogCellDurationGradient);
            MainLogContentView   = ItemView.FindViewById(Resource.Id.MainLogContentView);

            groupExpansionButton = ItemView.FindViewById(TimeEntriesLogCellToggleExpansionButton);
            timeEntriesLogCellContinueButton.Click += onContinueClick;
            groupExpansionButton.Click             += onExpansionClick;

            mainLogBackgroundContinue.Text = Shared.Resources.Continue;
            mainLogBackgroundDelete.Text   = Shared.Resources.Delete;
            addDescriptionLabel.Text       = Shared.Resources.AddDescription;
        }
Пример #9
0
 public CustomViewHolder(ViewGroup parent) :
     base(LayoutInflater.From(parent.Context).Inflate(Resource.Layout.custom_row_view, parent, false))
 {
     NameTextView        = ItemView.FindViewById <TextView>(Resource.Id.text_view_name);
     DescriptionTextView = ItemView.FindViewById <TextView>(Resource.Id.text_view_description);
     UndoButton          = ItemView.FindViewById <Button>(Resource.Id.undo_button);
 }
        public PostViewHolder(View itemView) : base(itemView)
        {
            Title = ItemView.FindViewById <TextView>(Resource.Id.title);
            Body  = ItemView.FindViewById <TextView>(Resource.Id.msg);

            Observable.FromEventPattern(itemView, "Click")
            .Subscribe(_ => Core.Domain.App.App.Store.Dispatch(PostsActionsCreator.SelectPost(Post.Id)));
        }
 public Customer_Service_RelativeDiscount_ViewModel_ViewHolder(View itemview, Action <int> listener) : base(itemview)
 {
     ServiceImg        = ItemView.FindViewById <ImageView>(Resource.Id.imgService_ItemRelativeDiscount_Service_Customer);
     ServiceName       = ItemView.FindViewById <TextView>(Resource.Id.txtNameService_ItemRelativeDiscount_Service_Customer);
     ServicePrice      = ItemView.FindViewById <TextView>(Resource.Id.txtServicePrice_ItemRelativeDiscount_Service_Customer);
     NumberOutletApply = ItemView.FindViewById <TextView>(Resource.Id.txtOutlet_ItemRelativeDiscount_Service_Customer);
     itemview.Click   += (sender, e) => listener(base.Position);
 }
Пример #12
0
 public BrandsViewHolder(
     View itemView,
     Action <Brand> clickListener,
     Action <Brand> longClickListener = null)
     : base(itemView, clickListener, longClickListener)
 {
     TvTitle = ItemView.FindViewById <TextView>(Resource.Id.tv_title);
 }
Пример #13
0
 public Customer_Service_CustomerComment_ViewModel_ViewHolder(View itemview, Action <int> listener) : base(itemview)
 {
     Img             = ItemView.FindViewById <ImageView>(Resource.Id.ImgCustomer_ItemCustomerComment_Service_Customer);
     Name            = ItemView.FindViewById <TextView>(Resource.Id.txtCustomerName_ItemCustomerComment_Service_Customer);
     Comment         = ItemView.FindViewById <TextView>(Resource.Id.txtCustomerComment_ItemCustomerComment_Service_Customer);
     Date            = ItemView.FindViewById <TextView>(Resource.Id.txtDate_ItemCustomerComment_Service_Customer);
     itemview.Click += (sender, e) => listener(base.Position);
 }
        private void InitializeView()
        {
            var wheelPicker = ItemView.FindViewById <WheelPicker>(Resource.Id.coin_picker);

            wheelPicker.Items         = _displayCoins;
            wheelPicker.ItemSelected += WheelPickerOnItemSelected;
            wheelPicker.Select(SelectedPosition);
        }
Пример #15
0
        private void InitializeView()
        {
            _title          = ItemView.FindViewById <TextView>(Resource.Id.message_title);
            _title.Typeface = Style.Regular;

            _message          = ItemView.FindViewById <TextView>(Resource.Id.message_body);
            _message.Typeface = Style.Regular;
        }
        public ImageDetailDetectedViewHolder(View itemView, Action <int> listener) : base(itemView)
        {
            headingText     = itemView.FindViewById <TextView>(Resource.Id.ImageDetail_DetectedHeadingView);
            detectedText    = itemView.FindViewById <TextView>(Resource.Id.ImageDetail_DetectedView);
            progressSpinner = ItemView.FindViewById <ProgressBar>(Resource.Id.ImageDetail_DetectedSpinner);

            itemView.Click += (sender, e) => listener(base.Position);
        }
 public TractorRecyclerAdapterViewHolder(
     View itemView,
     Action <Tractor> clickListener
     ) : base(itemView)
 {
     TvTitle         = ItemView.FindViewById <TextView>(Resource.Id.tv_title);
     itemView.Click += (sender, e) => clickListener(Tractor);
 }
Пример #18
0
            public EmptyFooter(View root) : base(root)
            {
                var retryLayout = ItemView.FindViewById <RelativeLayout> (Resource.Id.RetryLayout);
                var progressBar = ItemView.FindViewById <ProgressBar> (Resource.Id.ProgressBar);

                progressBar.Visibility = ViewStates.Invisible;
                retryLayout.Visibility = ViewStates.Invisible;
            }
Пример #19
0
        public ProgressTrackerViewHolder(View itemView) : base(itemView)
        {
            NutrientName            = itemView.FindViewById <TextView>(Resource.Id.nutrientName);
            NutrientProgressAmount  = itemView.FindViewById <TextView>(Resource.Id.nutrientProgressAmount);
            NutrientGoalAmount      = itemView.FindViewById <TextView>(Resource.Id.nutrientGoalAmount);
            NutrientRemainingAmount = itemView.FindViewById <TextView>(Resource.Id.nutrientRemainingAmount);

            ProgressBar = ItemView.FindViewById <ProgressBar>(Resource.Id.pb);
        }
Пример #20
0
        public ListContentView(LayoutInflater inflater, ViewGroup parent, Action <int> listener) : base(inflater.Inflate(Resource.Layout.ListDayEvents, parent, false))
        {
            Image    = ItemView.FindViewById <ImageView>(Resource.Id.list_avatar);
            Title    = ItemView.FindViewById <TextView>(Resource.Id.list_title);
            Category = ItemView.FindViewById <TextView>(Resource.Id.list_type);
            Time     = ItemView.FindViewById <TextView>(Resource.Id.time);

            ItemView.Click += (sender, e) => listener(AdapterPosition);
        }
Пример #21
0
 private void SetDate(DateTime end)
 {
     ItemView.FindViewById <TextView>(Resource.Id.text_view_goal_item_date).Text = end.ToString("dd. MMM", CultureInfo.CurrentCulture);
     if (end.Year == DateTime.Now.Year)
     {
         return;
     }
     ItemView.FindViewById <TextView>(Resource.Id.text_view_goal_item_year).Text = end.ToString("yyyy");
 }
Пример #22
0
            public GameAdapterViewHolder(View itemView, Action <int> listener, Action <int> longClickListener) : base(itemView)
            {
                Name            = itemView.FindViewById <TextView>(Resource.Id.name);
                Result          = itemView.FindViewById <TextView>(Resource.Id.result);
                NoteProgressBar = ItemView.FindViewById <ProgressBar>(Resource.Id.progressBar);

                itemView.Click     += (sender, e) => listener(base.LayoutPosition);
                itemView.LongClick += (sender, e) => longClickListener(base.LayoutPosition);
            }
Пример #23
0
            // Get references to the views defined in the CardView layout.
            public LogViewHolder(View itemView, Action <int> addClickListener)
                : base(itemView)
            {
                TextViewName    = itemView.FindViewById <TextView>(Resource.Id.exerciseName);
                TextViewKeyStat = itemView.FindViewById <TextView>(Resource.Id.keyStat);
                btnAdd          = ItemView.FindViewById <FloatingActionButton>(Resource.Id.btnAdd);

                btnAdd.Click += (s, e) => addClickListener(base.Position);
            }
Пример #24
0
        public FileViewHolder(ViewGroup parent) : base(LayoutInflater.From(parent.Context).Inflate(Resource.Layout.FileView, parent, false))
        {
            _iconView      = ItemView.FindViewById <ImageView>(Resource.Id.icon);
            _extensionView = ItemView.FindViewById <TextView>(Resource.Id.extension);
            _labelView     = ItemView.FindViewById <TextView>(Resource.Id.name);
            _sizeView      = ItemView.FindViewById <TextView>(Resource.Id.size);

            ItemView.SetOnClickListener(this);
        }
Пример #25
0
 public TutorialViewHolder(ViewGroup parent) : base(parent, Resource.Layout.list_item_tutorial)
 {
     title    = ItemView.FindViewById <TextView>(Resource.Id.title);
     layout   = ItemView.FindViewById <AbsoluteLayout>(Resource.Id.view);
     image    = ItemView.FindViewById <ImageView>(Resource.Id.image);
     progress = ItemView.FindViewById <ProgressBar>(Resource.Id.progress);
     button   = ItemView.FindViewById <Button>(Resource.Id.button);
     message  = ItemView.FindViewById <TextView>(Resource.Id.text);
 }
Пример #26
0
 private BitmapWorkerTask CreateBitmapWorkerTask(ImageView imageView)
 {
     return(new BitmapWorkerTask(imageView, command.ImageService, color => currentPalette = color)
     {
         ContentResolver = command.Resolver,
         TextRootView = ItemView.FindViewById <RelativeLayout>(Resource.Id.relative_layout_goal_item_info_tile),
         TextDateView = ItemView.FindViewById <TextView>(Resource.Id.text_view_goal_item_date),
     });
 }
Пример #27
0
            public CrimeHolder(LayoutInflater inflater, ViewGroup parent)
                : base(inflater.Inflate(Resource.Layout.list_item_crime, parent, false))
            {
                ItemView.SetOnClickListener(this);

                titleTextView   = ItemView.FindViewById <TextView>(Resource.Id.CrimeTitle);
                dateTextView    = ItemView.FindViewById <TextView>(Resource.Id.CrimeDate);
                solvedImageView = ItemView.FindViewById <ImageView>(Resource.Id.CrimeSolved);
            }
Пример #28
0
 public void SetViewModel(MeasurementViewModel model)
 {
     Model = model;
     ItemView.FindViewById <TextView>(Resource.Id.measurement_title).Text = model.Type;
     if (model.Values.Any())
     {
         ItemView.FindViewById <EditText>(Resource.Id.measurement_current_value).Text = $"{model.Values.Last().Value}";
     }
 }
        /// <summary>
        /// Config
        /// </summary>
        /// <returns>The config.</returns>
        /// <param name="trailerStock">Trailer stock.</param>
        public void Config(DriverStock trailerStock)
        {
            using (var cylinderImageView = ItemView.FindViewById <ImageView>(Resource.Id.cylinderImageView))
            {
                var icon = ProductIcon.GetIcon(trailerStock.ProductCode);

                if (icon != null)
                {
                    cylinderImageView.SetImageResource(icon.Value);
                }
                else
                {
                    cylinderImageView.SetImageResource(0);
                }
            }

            using (var descriptionTextView = ItemView.FindViewById <TextView>(Resource.Id.descriptionTextView))
            {
                descriptionTextView.Text = trailerStock.ShortDescription;
            }

            using (var fullsTextView = ItemView.FindViewById <TextView>(Resource.Id.fullsTextView))
            {
                var fullsLabel = ItemView.Context.Resources.GetString(Resource.String.label_fulls);
                fullsTextView.Text       = String.Format("{0} {1}", trailerStock.Fulls, fullsLabel);
                fullsTextView.Visibility = trailerStock.Fulls > 0 ? ViewStates.Visible : ViewStates.Gone;
            }

            using (var emptiesTextView = ItemView.FindViewById <TextView>(Resource.Id.emptiesTextView))
            {
                var emptiesLabel = ItemView.Context.Resources.GetString(Resource.String.label_empties);
                emptiesTextView.Text       = String.Format("{0} {1}", trailerStock.Empties, emptiesLabel);
                emptiesTextView.Visibility = trailerStock.Empties > 0 ? ViewStates.Visible : ViewStates.Gone;
            }

            using (var faultyEmptiesTextView = ItemView.FindViewById <TextView>(Resource.Id.faultyEmptiesTextView))
            {
                var faultyEmptiesLabel = ItemView.Context.Resources.GetString(Resource.String.label_faulty_empties);
                faultyEmptiesTextView.Text       = String.Format("{0} {1}", trailerStock.FaultyEmpties, faultyEmptiesLabel);
                faultyEmptiesTextView.Visibility = trailerStock.FaultyEmpties > 0 ? ViewStates.Visible : ViewStates.Gone;
            }

            using (var faultyFullsTextView = ItemView.FindViewById <TextView>(Resource.Id.faultyFullsTextView))
            {
                var faultyFullsLabel = ItemView.Context.Resources.GetString(Resource.String.label_faulty_fulls);
                faultyFullsTextView.Text       = String.Format("{0} {1}", trailerStock.FaultyFulls, faultyFullsLabel);
                faultyFullsTextView.Visibility = trailerStock.FaultyFulls > 0 ? ViewStates.Visible : ViewStates.Gone;
            }

            using (var orderedTextView = ItemView.FindViewById <TextView>(Resource.Id.orderedTextView))
            {
                var orderedLabel = ItemView.Context.Resources.GetString(Resource.String.label_ordered);
                orderedTextView.Text       = String.Format("{0} {1}", trailerStock.OrderQuantity, orderedLabel);
                orderedTextView.Visibility = trailerStock.OrderQuantity > 0 ? ViewStates.Visible : ViewStates.Gone;
            }
        }
Пример #30
0
            public void Bind(IContentItem contentItem)
            {
                _contentItemViewHolder?.Dispose();

                var container = ItemView.FindViewById <ViewGroup>(Resource.Id.contentItem_container);

                _contentItemViewHolder = _displayContext.ViewHolderFactory.CreateContentItemViewHolder(container, contentItem);

                container.AddView(_contentItemViewHolder.View);
            }