public override View OnCreateView (LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle)
		{
			var frame = (FrameLayout)layoutInflater.Inflate(Resource.Layout.zxingscannerfragmentlayout, null);

			var layoutParams = new LinearLayout.LayoutParams (ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent);
							
			try
			{
				scanner = new ZXingSurfaceView (this.Activity, ScanningOptions, callback);
				frame.AddView(scanner, layoutParams);


				if (!UseCustomView)
				{
					zxingOverlay = new ZxingOverlayView (this.Activity);
					zxingOverlay.TopText = TopText ?? "";
					zxingOverlay.BottomText = BottomText ?? "";

					frame.AddView (zxingOverlay, layoutParams);
				}
				else if (CustomOverlayView != null)
				{
					frame.AddView(CustomOverlayView, layoutParams);
				}
			}
			catch (Exception ex)
			{
				Console.WriteLine ("Create Surface View Failed: " + ex);
			}
			return frame;
		}
        public override RecyclerView.ViewHolder OnCreateViewHolder(Android.Views.ViewGroup parent, int viewType)
        {
            var itemView = LayoutInflater.From(this.Activity).Inflate(Resource.Layout.item_group_choosed_contact, parent, false);
            var holder   = new SelectedContactViewHolder(itemView, OnClick, OnLongClick);

            return(holder);
        }
Beispiel #3
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(Android.Views.ViewGroup parent, int viewType)
        {
            View row = LayoutInflater.From(mContext).Inflate(Resource.Layout.layout_seguimientoGroup, parent, false);

            TextView txtOrdenTicket = row.FindViewById <TextView> (Resource.Id.txtOrderTicket);
            TextView txtFechaTicket = row.FindViewById <TextView> (Resource.Id.txtFechaTicket);
            //TextView txtCorreoTicket = row.FindViewById<TextView> (Resource.Id.txtCorreoTicket);
            TextView txtStatusTicket = row.FindViewById <TextView> (Resource.Id.txtStatusTicket);
            //TextView txtNotaTicket = row.FindViewById<TextView> (Resource.Id.txtNotaTicket);
            TextView txtNombreApellido = row.FindViewById <TextView> (Resource.Id.txtNombreTicket);
            //TextView txtEmail = row.FindViewById<TextView> (Resource.Id.txtCorreoTicket);
            ImageView imgSemaforo = row.FindViewById <ImageView> (Resource.Id.img_semaforo);
            Button    btnDetalle  = row.FindViewById <Button> (Resource.Id.btnDetalleSeguimiento);

            SeguimientoAdapterWrapper view = new SeguimientoAdapterWrapper(row)
            {
                OrdenTicket   = txtOrdenTicket,
                FechaTicket   = txtFechaTicket,
                StatusTicket  = txtStatusTicket,
                FirstLastName = txtNombreApellido,
                DetalleTicket = btnDetalle,
                Semaforo      = imgSemaforo
            };

            return(view);
        }
        public override Android.Views.View GetView(int position,
                                                   Android.Views.View reusableView,
                                                   Android.Views.ViewGroup parent)
        {
            if (reusableView == null)
            {
                var inflater = LayoutInflater.From(parent.Context);

                reusableView = inflater.Inflate(Resource.Layout.ItemLayout,
                                                parent,
                                                false);
            }

            CancionModel song = (CancionModel)this.GetItem(position);

            TextView tvTitle    = (TextView)reusableView.FindViewById(Resource.Id.tvTitle);
            TextView tvSubTitle = reusableView.FindViewById(Resource.Id.tvSubtitle)
                                  as TextView;

            tvTitle.Text = song.Title;

            tvSubTitle.Text = song.Subtitle;

            return(reusableView);
        }
Beispiel #5
0
        public override View GetView(int position, Android.Views.View convertView, Android.Views.ViewGroup parent)
        {
            View view = convertView;

            if (view == null)
            {
                view = LayoutInflater.From(Context).Inflate(Resource.Layout.AbcRankTaskItems, null);
            }
            else
            {
                ((BitmapDrawable)view.FindViewById <ImageView>(Resource.Id.abcRankMeidaElementImage).Drawable).Bitmap.Recycle();
            }

            var item = GetItem(position);

            if (item.Media != null)
            {
                var bitmap = AssetHelper.GetBitmap(Context, item.Media.ImagePath);
                if (bitmap != null)
                {
                    view.FindViewById <ImageView>(Resource.Id.abcRankMeidaElementImage).SetImageBitmap(bitmap);
                }
            }
            else
            {
                view.FindViewById <ImageView>(Resource.Id.abcRankMeidaElementImage).Visibility = ViewStates.Gone;
                view.FindViewById <TextView>(Resource.Id.abcRankElementName).Text = item.Name;
            }

            return(view);
        }
        public void PrintViewHierarchy(Android.Views.ViewGroup vg, StringBuilder sb, int level = 0)
        {
            for (int i = 0; i < vg.ChildCount; i++)
            {
                var v        = vg.GetChildAt(i);
                var vElement = v as IFrameworkElement;
                var desc     = string.Concat(Enumerable.Repeat("    |", level)) + $" [{i+1}/{vg.ChildCount}] {v.Class.SimpleName}";
                if (vElement != null)
                {
                    desc += $" -- ActualHeight:{vElement.ActualHeight}, ActualWidth:{vElement.ActualWidth}, Height:{vElement.Height}, Width:{vElement.Width}, DataContext:{vElement.DataContext?.GetType().FullName}";
                    var vTextBlock = vElement as TextBlock;
                    if (vTextBlock != null)
                    {
                        desc += $", Text: {vTextBlock.Text}";
                    }
                }

                sb.AppendLine(desc);
                var childViewGroup = v as Android.Views.ViewGroup;
                if (childViewGroup != null)
                {
                    PrintViewHierarchy(childViewGroup, sb, level + 1);
                }
            }
        }
Beispiel #7
0
        public override AViews.View GetView(int position, AViews.View convertView, AViews.ViewGroup parent)
        {
            var view = WrappedAdapter.GetView(position, convertView, parent);

            view.SetOnDragListener(this);
            return(view);
        }
Beispiel #8
0
        public override Java.Lang.Object InstantiateItem(Android.Views.ViewGroup container, int position)
        {
            BasePager pager = hactivity.pagerList [position];

            container.AddView(pager.rootView);
            return(pager.rootView);
        }
        public override View GetView(int position, Android.Views.View convertView, Android.Views.ViewGroup parent)
        {
            var view = convertView;

            if (view == null)
            {
                view = layoutInflater.Inflate(Resource.Layout.BuildSyllableMediaElement, null);
            }
            else
            {
                ((BitmapDrawable)view.FindViewById <ImageView>(Resource.Id.ivMeidaElementImage).Drawable).Bitmap.Recycle();
            }


            var bitmap    = BitmapFactory.DecodeResource(Context.Resources, Resource.Drawable.ic_volume_up_black_24dp);
            var imageView = view.FindViewById <ImageView>(Resource.Id.ivMeidaElementImage);

            imageView.SetImageBitmap(bitmap);

            if (addMultiIcon)
            {
                view.FindViewById <TextView>(Resource.Id.tvAddMultiIcon).Text = "+";
            }

            return(view);
        }
Beispiel #10
0
        public static object[] getChilds(Android.Views.View pView)
        {
            List <object> list = new List <object>();

            if (pView != null)
            {
                if (pView as IIndestructable == null)
                {
                    //  ToolMobile.log("getChilds form [" + pView.GetType().FullName + "]");

                    Android.Views.ViewGroup g = pView as Android.Views.ViewGroup;
                    if (g != null)
                    {
                        for (int i = 0; i < g.ChildCount; ++i)
                        {
                            View v = g.GetChildAt(i);

                            //   ToolMobile.log("getChilds added child [" + v.GetType().FullName + "]");

                            list.Add(v);
                        }
                    }
                    else
                    {
                        //ToolMobile.log("getChilds not for ViewGroup [" + pView.GetType().FullName + "]");
                    }
                }
            }
            return(list.ToArray());
        }
        public View GetHeaderView(int position, Android.Views.View convertView, Android.Views.ViewGroup parent)
        {
            ViewHolder holder;

            if (convertView == null)
            {
                holder          = new ViewHolder();
                convertView     = inflater.Inflate(Resource.Layout.Header, parent, false);
                holder.text     = convertView.FindViewById <TextView>(Resource.Id.text1);
                convertView.Tag = holder;
            }
            else
            {
                holder = (ViewHolder)convertView.Tag;
            }

            // set header text as first char in name
            string headerString;

            if (position == 0)
            {
                // Moderator section
                headerString = $"Moderators - {modCount}";
            }
            else
            {
                // Viewers section
                headerString = $"Viewers - {viewers.Count - modCount}";
            }

            holder.text.Text = headerString;

            return(convertView);
        }
Beispiel #12
0
        //Returns the view for a specific item on the list
        public override View GetView(int position, Android.Views.View convertView, Android.Views.ViewGroup parent)
        {
            var      row         = convertView;
            var      currentItem = this [position];
            CheckBox checkBox;

            if (row == null)
            {
                var inflater = activity.LayoutInflater;
                row = inflater.Inflate(layoutResourceId, parent, false);

                /*
                 *              checkBox = row.FindViewById <CheckBox> (Resource.Id.checkToDoItem); // fix this
                 *
                 *              checkBox.CheckedChange += async (sender, e) => {
                 *                      var cbSender = sender as CheckBox;
                 *                      if (cbSender != null && cbSender.Tag is Prompt.PromptWrapper && cbSender.Checked) {
                 *                              cbSender.Enabled = false;
                 *      if (activity is SynchActivity)
                 *          await ((SynchActivity)activity).CheckPrompt((cbSender.Tag as Prompt.PromptWrapper).Prompt);
                 *  }
                 *              };
                 */
            }
            else
            {
                checkBox = row.FindViewById <CheckBox> (Resource.Id.checkToDoItem);                 //fix this
            }
            //	checkBox.Text = currentItem.Text;
            //	checkBox.Checked = false;
            //	checkBox.Enabled = true;
            //	checkBox.Tag = new ToDoItemWrapper (currentBeacon);

            return(row);
        }
        public override RecyclerView.ViewHolder OnCreateViewHolder(Android.Views.ViewGroup parent, int viewType)
        {
            TextView tv = (TextView)LayoutInflater.From(parent.Context).
                          Inflate(Android.Resource.Layout.SimpleListItem1, parent, false);

            return(new ViewHolder(tv));
        }
        public override RecyclerView.ViewHolder OnCreateViewHolder(Android.Views.ViewGroup parent, int viewType)
        {
            var itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_contact_history, parent, false);
            var holder   = new ContactListItemViewHolder(itemView, OnClick, OnLongClick);

            return(holder);
        }
        public void OnClick(Android.Views.View view)
        {
            Android.Views.View nextChild = ((ViewGroup)view).GetChildAt(1);
            string             organName = ((TextView)nextChild).Text;

            lastClicked = (ViewGroup)view;

            string donorLat  = Intent.GetStringExtra("donorLat");
            string donorLong = Intent.GetStringExtra("donorLong");

            foreach (DonatableOrgan organ in organs)
            {
                if (organName.ToLower().Equals(organ.organType.ToLower()))
                {
                    string OrganString = organ.ToJson();

                    Intent intent = new Intent(this, typeof(OrganTransferActivity));
                    intent.PutExtra("organ", OrganString);
                    intent.PutExtra("donorLat", donorLat);
                    intent.PutExtra("donorLong", donorLong);
                    StartActivityForResult(intent, 1);
                    break;
                }
            }
        }
        public override Android.Views.View GetView(int position, Android.Views.View convertView, ViewGroup parent)
        {
            ViewHolder holder;

            if (convertView == null)
            {
                convertView = inflater.Inflate(Resource.Layout.PostItem, parent, false);
                holder = new ViewHolder();

                
                holder.avatar = (ImageView)convertView
                    .FindViewById(Resource.Id.user_photo);
                holder.userNick = (TextView)convertView
                        .FindViewById(Resource.Id.user_nick);
                holder.postDate = (TextView)convertView
                        .FindViewById(Resource.Id.post_date);
                holder.postContent = (TextView)convertView
                        .FindViewById(Resource.Id.post_content);
                
                convertView.SetTag(Resource.String.view_holder_tag, holder);
            }

            else 
            {
                holder = (ViewHolder)convertView.GetTag(Resource.String.view_holder_tag);
            }

            Post postAtPosition = posts[position];
            holder.postContent.Text = postAtPosition.content;
            holder.userNick.Text = postAtPosition.userName;
            holder.postDate.Text = HttpUtils.postDateToShowFormat(postAtPosition.updatedAt);
            Color backgroundColor = postAtPosition.marked ? context.Resources.GetColor(Resource.Color.post_selected) : context.Resources.GetColor(Resource.Color.post_idle);
            convertView.SetBackgroundColor(backgroundColor);
            return convertView;
        }
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
			View view = inflater.Inflate(Resource.Layout.ProfileFragment, container, false);

			VBUser user = VBUser.GetUserFromPreferences();
			TextView userType = view.FindViewById<TextView>(Resource.Id.profileUserTypeValue);
			EditText name = view.FindViewById<EditText>(Resource.Id.profileNameValue);
//			Spinner position = view.FindViewById<Spinner>(Resource.Id.profilePositionValue);
//			EditText number = view.FindViewById<EditText>(Resource.Id.profileNumberValue);
//			EditText team = view.FindViewById<EditText>(Resource.Id.profileTeamValue);
			EditText password = view.FindViewById<EditText>(Resource.Id.profilePasswordValue);

//			ArrayAdapter adapter = ArrayAdapter.CreateFromResource(this.Activity, Resource.Array.positions, Resource.Layout.SpinnerTextView);
//			adapter.SetDropDownViewResource(Resource.Layout.SpinnerCheckedLayout);
//			position.Adapter = adapter;

			if(user != null) {
				//UserType
				userType.Text = user.getUserType().ToString();

				//Name
				view.FindViewById(Resource.Id.profileNameLine).Visibility = ViewStates.Visible;
				name.Text = user.name;

//				//Position
//				if(DB_Communicator.getInstance().isAtLeast(user.listTeamRole[0].getUserType(), UserType.Coremember)) {
//					view.FindViewById(Resource.Id.profilePositionLine).Visibility = ViewStates.Visible;
//					position.SetSelection(getIdOfPosition(user.listTeamRole[0].position));
//				}
//
//				//Number
//				if(DB_Communicator.getInstance().isAtLeast(user.listTeamRole[0].getUserType(), UserType.Coremember)) {
//					view.FindViewById(Resource.Id.profileNumberLine).Visibility = ViewStates.Visible;
//					number.Text = user.listTeamRole[0].number.ToString();
//				}
					
//				view.FindViewById(Resource.Id.profilePasswordLine).Visibility = ViewStates.Visible;
//				password.Text = user.password;
				
				
				view.FindViewById<Button>(Resource.Id.profileBtnSave).Click += async delegate {
					DB_Communicator db = DB_Communicator.getInstance();
					JsonValue json = await db.UpdateUser(name.Text, "");
					
					//ändernungen im user speichern
					List<VBUser> list = db.createUserFromResponse(json, user.password);
					if(list.Count > 0) {
						VBUser updatedUser = db.createUserFromResponse(json, user.password)[0];
						updatedUser.StoreUserInPreferences(this.Activity, updatedUser);
					}
					
					Toast.MakeText(this.Activity, json["message"].ToString(), ToastLength.Long).Show();
				};
			} else {
				view.FindViewById(Resource.Id.profileErrorLine).Visibility = ViewStates.Visible;
				view.FindViewById<EditText>(Resource.Id.profileErrorValue).Text = "There was an error loading your profile information! " +
																					" Server may be down!";
			}

			return view;
		}
        public override Java.Lang.Object InstantiateItem(Android.Views.ViewGroup container, int position)
        {
            var fragment    = base.InstantiateItem(container, position);
            var mvxFragment = fragment as MvxFragment;

            if (mvxFragment != null)
            {
                if (mvxFragment.ViewModel == null)
                {
                    mvxFragment.DataContext = GetItemDataContext(position);
                }

                if (mvxFragment.View == null)
                {
                    mvxFragment.StartCalled += MvxFragment_StartCalled;
                }
                else
                {
                    OnFragmentViewCreated(mvxFragment);
                }

                mvxFragment.ResumeCalled += MvxFragment_ResumeCalled;
            }

            return(fragment);
        }
        /// <summary>
        /// Override of the <see cref="ViewCellRenderer"/> GetCellCore method, used to apply any custom
        /// settings to the Android platform-specific cell display element.
        /// </summary>
        /// <returns>The Android platform-specific cell display element after applying any custom settings to it</returns>
        /// <param name="item">The <see cref="T:Xamarin.Forms.Cell"/> instance whose properties need to be transferred
        /// from</param>
        /// <param name="convertView">A previously-created Android platform-specific display element if this cell has
        /// been rendered before</param>
        /// <param name="parent">The parent Android view container for the cell</param>
        /// <param name="context">The Android context that should be used for retrieving assets</param>
        protected override AView GetCellCore(Cell item, AView convertView, AViewGroup parent, Context context)
        {
            var nativeCell = base.GetCellCore(item, convertView, parent, context);

            DroidXFGlossCellRenderer.UpdateProperties(item, nativeCell);
            return(nativeCell);
        }
        public override View GetView(int position, Android.Views.View convertView, Android.Views.ViewGroup parent)
        {
            var view = convertView;

            if (view == null)
            {
                view = context.LayoutInflater.Inflate(Resource.Layout.InstructorRow, parent, false);

                var p = view.FindViewById <ImageView>(Resource.Id.photoImageView);
                var n = view.FindViewById <TextView>(Resource.Id.nameTextView);
                var s = view.FindViewById <TextView>(Resource.Id.specialtyTextView);

                view.Tag = new ViewHolder()
                {
                    Photo = p, Name = n, Specialty = s
                };
            }

            var holder = (ViewHolder)view.Tag;

            holder.Photo.SetImageDrawable(ImageAssetManager.Get(context, instructors[position].ImageUrl));
            holder.Name.Text      = instructors[position].Name;
            holder.Specialty.Text = instructors[position].Specialty;

            return(view);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            return inflater.Inflate(Resource.Layout.TestFragment, container, false);

            return base.OnCreateView(inflater, container, savedInstanceState);
        }
Beispiel #22
0
        //Returns the view for a specific item on the list
        public override View GetView(int position, Android.Views.View convertView, Android.Views.ViewGroup parent)
        {
            var row         = convertView;
            var currentItem = this[position];
            //CheckBox checkBox;
            TextView icon;
            TextView name;
            TextView content;
            TextView meal;

            if (row == null)
            {
                var inflater = activity.LayoutInflater;
                row = inflater.Inflate(layoutResourceId, parent, false);

                icon    = row.FindViewById <TextView>(Resource.Id.txtIcon);
                name    = row.FindViewById <TextView>(Resource.Id.txtName);
                content = row.FindViewById <TextView>(Resource.Id.txtContent);
                meal    = row.FindViewById <TextView>(Resource.Id.txtMeal);
            }
            else
            {
                icon    = row.FindViewById <TextView>(Resource.Id.txtIcon);
                name    = row.FindViewById <TextView>(Resource.Id.txtName);
                content = row.FindViewById <TextView>(Resource.Id.txtContent);
                meal    = row.FindViewById <TextView>(Resource.Id.txtMeal);
            }
            icon.Text    = currentItem.Icon;
            name.Text    = currentItem.Name;
            content.Text = currentItem.Content;
            meal.Text    = currentItem.Meal;

            return(row);
        }
Beispiel #23
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(Android.Views.ViewGroup parent, int viewType)
        {
            var itemView = LayoutInflater.From(this.Activity).Inflate(Resource.Layout.item_group_member_edit, parent, false);
            var holder   = new GroupEditorItemViewHolder(itemView, OnClick, OnLongClick);

            return(holder);
        }
        public override RecyclerView.ViewHolder OnCreateViewHolder(Android.Views.ViewGroup parent, int viewType)
        {
            var itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_status_kind_viewholder, parent, false);
            var holder   = new StatusViewHolder(itemView, OnClick, OnLongClick);

            return(holder);
        }
    public override View GetView(int position, View convertView, ViewGroup parent)
    {
      var isNewView = convertView == null;

      var view = convertView ?? _context.LayoutInflater.Inflate(
            Resource.Layout.TodoGrid,
            parent,
            false) as GridLayout;

      System.Diagnostics.Debug.Assert(view != null, "TodoItem view is null?!?");

      // View Controls
      var delete = view.FindViewById<Button>(Resource.Id.DeleteButton);
      var description = view.FindViewById<TextView>(Resource.Id.DescriptionText);
      var isDone = view.FindViewById<CheckBox>(Resource.Id.IsDoneCheckbox);

      // Copy item data to the controls
      var vm = _todoVms[position];
      var item = vm.Todo;
      view.Tag = vm.ViewKey.ToString(CultureInfo.InvariantCulture);
      description.Text = item.Description;
      isDone.Checked = item.IsDone;

      if (isNewView) {
        // add event handlers to new views only
        isDone.Click += (sender, e) => IsDoneClicked(view, isDone);
        description.TextChanged += (sender, e) => DescriptionChanged(view, description);
        delete.Click += (sender, e) => DeleteClicked(view);
      }
      return view;
    }
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			// Use this to return your custom view for this Fragment
			var view = inflater.Inflate(Resource.Layout.HeaderFragmentLayout, container, false);
			var homeBtn = view.FindViewById<ImageView>(Resource.Id.HeaderLogo);
			var overlayBtn = view.FindViewById<ImageView>(Resource.Id.HeaderOverlay);
			var animIn = AnimationUtils.LoadAnimation(Activity.BaseContext, Resource.Animation.Overlay_animIn);

			homeBtn.Click += delegate
			{
				if (!(Activity is MainActivity))
				{
					var i = new Intent(Activity, typeof(MainActivity));
					i.AddFlags(ActivityFlags.NewTask | ActivityFlags.ClearTop);
					Activity.StartActivity(i);
				}
			};

			overlayBtn.Click += delegate
			{
				overlay.View.StartAnimation(animIn);
				overlay.Initialize();
				overlay.View.Visibility = ViewStates.Visible;
			};

			return view;
		}
            public override Java.Lang.Object InstantiateItem(AViews.ViewGroup container, int position)
            {
                Xamarin.Forms.View formsView = null;
                var bindingContext           = Element.ItemsSource.Cast <object> ().ElementAt(position);

                var selector = Element.ItemTemplate as DataTemplateSelector;

                if (selector != null)
                {
                    formsView = (Xamarin.Forms.View)selector.SelectTemplate(bindingContext, Element).CreateContent();
                }
                else
                {
                    formsView = (Xamarin.Forms.View)Element.ItemTemplate.CreateContent();
                }

                formsView.BindingContext = bindingContext;

                // Width in dip and not in pixels. (all Xamarin.Forms controls use dip for their WidthRequest and HeightRequest)
                // Resources.DisplayMetrics.WidthPixels / Resources.DisplayMetrics.Density
                var nativeConverted = FormsToNativeDroid.ConvertFormsToNative(formsView, new Rectangle(0, 0, Element.Width, Element.Height));

                nativeConverted.Tag = position;

                var pager = (ViewPager)container;

                pager.AddView(nativeConverted);

                return(nativeConverted);
            }
        /// <inheritdoc/>
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            ZTnTrace.Trace(MethodBase.GetCurrentMethod());

            var view = inflater.Inflate(Resource.Layout.Home, container, false);

            var careerListView = view.FindViewById<ListView>(Resource.Id.AccountsListView);
            careerListView.ItemClick += (sender, args) =>
            {
                var viewCareerIntent = new Intent(Activity, typeof(ViewCareerActivity));
                D3Context.Instance.BattleTag = args.View.FindViewById<TextView>(Android.Resource.Id.Text1)
                    .Text;
                D3Context.Instance.Host = args.View.FindViewById<TextView>(Android.Resource.Id.Text2)
                    .Text;
                StartActivity(viewCareerIntent);
            };

            D3Context.Instance.DbAccounts = new AccountsDB(Activity);
            cursor = D3Context.Instance.DbAccounts.GetAccounts();
            Activity.StartManagingCursor(cursor);

            IListAdapter accountsAdapter = new SimpleCursorAdapter(Activity, Android.Resource.Layout.SimpleListItem2, cursor, accountsFromColumns, accountsToId);
            view.FindViewById<ListView>(Resource.Id.AccountsListView)
                .Adapter = accountsAdapter;

            return view;
        }
Beispiel #29
0
        public override View GetView(int position, View convertView, ViewGroup parent)
        {
            ViewHolder holder = null;
            if (convertView == null) {
                LayoutInflater inflator = LayoutInflater.From (nn_context);
                convertView = inflator.Inflate (Resource.Layout.team_findpotencialmember_item, null);

                holder = new ViewHolder ();
                holder.contentview = (RelativeLayout)convertView;
                holder.button = (Button)convertView.FindViewById (Resource.Id.findpotencialmember_uninvite_button);
                holder.textviewtitle = (TextView)convertView.FindViewById (Resource.Id.findpotencialmember_membername_textview);
                convertView.Tag=holder;
            } else {
                holder= (ViewHolder) convertView.Tag;
            }

            holder.button.Tag = position;

            holder.textviewtitle.Text = nn_list [position].first_name+" "+nn_list [position].last_name;
            holder.button.Visibility = ViewStates.Visible;
            holder.button.Click -= OnInviteClick;
            holder.button.Click += OnInviteClick;
            holder.button.Text = "Invite";
            holder.button.SetTextColor (Color.White);
            holder.button.SetTypeface (Typeface.Default, TypefaceStyle.Bold);

            return convertView;
        }
		protected override AView GetCellCore(Cell item, AView convertView, ViewGroup parent, Context context)
		{
			Performance.Start();
			var cell = (ViewCell)item;

			var container = convertView as ViewCellContainer;
			if (container != null)
			{
				container.Update(cell);
				Performance.Stop();
				return container;
			}

			BindableProperty unevenRows = null, rowHeight = null;
			if (ParentView is TableView)
			{
				unevenRows = TableView.HasUnevenRowsProperty;
				rowHeight = TableView.RowHeightProperty;
			}
			else if (ParentView is ListView)
			{
				unevenRows = ListView.HasUnevenRowsProperty;
				rowHeight = ListView.RowHeightProperty;
			}

			IVisualElementRenderer view = Platform.CreateRenderer(cell.View);
			Platform.SetRenderer(cell.View, view);
			cell.View.IsPlatformEnabled = true;
			var c = new ViewCellContainer(context, view, cell, ParentView, unevenRows, rowHeight);

			Performance.Stop();

			return c;
		}
        public static MonthView Create(ViewGroup parent, LayoutInflater inflater, string weekdayNameFormat,
            DateTime today, ClickHandler handler, int dividerColor, int dayBackgroundResId,
            int dayTextColorResId, int titleTextColor, int headerTextColor)
        {
            var view = (MonthView) inflater.Inflate(Resource.Layout.month, parent, false);
            view.setDividerColor(dividerColor);
            view.setDayTextColor(dayTextColorResId);
            view.setTitleTextColor(titleTextColor);
            view.setHeaderTextColor(headerTextColor);

            if (dayBackgroundResId != 0) {
                view.setDayBackground(dayBackgroundResId);
            }

            var originalDay = today;

            var firstDayOfWeek = (int) CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek;

            var headerRow = (CalendarRowView) view._grid.GetChildAt(0);

            for (int i = 0; i < 7; i++) {
                var offset = firstDayOfWeek - (int) today.DayOfWeek + i;
                today = today.AddDays(offset);
                var textView = (TextView) headerRow.GetChildAt(i);
                textView.Text = today.ToString(weekdayNameFormat);
                today = originalDay;
            }
            view._clickHandler = handler;
            return view;
        }
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			View v = inflater.Inflate (Resource.Layout.WebViewDialog, container, false);

			txtTitle = v.FindViewById<TextView> (Resource.Id.txt_dialog_title);
			divider = v.FindViewById<View> (Resource.Id.title_divider);
			webView = v.FindViewById<WebView> (Resource.Id.dialog_web_view);

			if (title == null || title.Length < 1) {
				txtTitle.Visibility = divider.Visibility = ViewStates.Gone;
			} else {
				txtTitle.Text = title;
			}

			if (url != null && url.Length > 0) {
				webView.LoadUrl (url);
			}

			if (showOkay) {
				btnOk.Visibility = ViewStates.Visible;
				btnOk.Click += (object sender, EventArgs e) => {
					this.Dismiss ();
				};
			}

			return v;
		}
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            RelativeLayout view = (RelativeLayout)inflater.Inflate (Resource.Layout.raffledetail_gettemppass, container, false);
            rootview = view;

            TextView hinttextview=(TextView)view.FindViewById (Resource.Id.gettemppass_hinttext_textview);
            hinttextview.Text = RequestTPScreenData.ProvideClientInfoTextViewText;

            emailorphone = (EditText)view.FindViewById (Resource.Id.gettemppass_emailorphone_edittext);
            emailorphone.Hint = RequestTPScreenData.ClientInfoTextFieldPlaceholder;

            requesttemppass = (Button)view.FindViewById (Resource.Id.gettemppass_requesttemppass_button);
            requesttemppass.Text = RequestTPScreenData.RequestTPBtnTitle;
            //send web request
            requesttemppass.Click+=OnRequestTempPassClick;

            TextView signuptextview=view.FindViewById<TextView> (Resource.Id.gettemppass_register_textview);
            nn_activity.SetClickAbleText (signuptextview,RequestTPScreenData.DontHaveAccountLabelText+RequestTPScreenData.SignUpBtnTitle,RequestTPScreenData.SignUpBtnTitle,()=>{

                if(FormatManager.chechinput(emailorphone.Text,FormatManager.FormatOption.Email)){
                    (nn_activity as HomeScreen).ShowBuyerSignUp(emailorphone.Text);
                }
                else{
                    (nn_activity as HomeScreen).ShowBuyerSignUp("");
                }

            });

            return view;
        }
        public override Java.Lang.Object InstantiateItem(A.ViewGroup container, int position)
        {
            /*
             * var imageView = new ImageView(context);
             * var inflater = LayoutInflater.From(Forms.Context);
             * A.View view = inflater.Inflate(Resource.Layout.CarouselCellOneLayout, null);
             * var colorView = view.FindViewById<A.View>(Resource.Id.colorViewSampleBox);
             * colorView.SetBackgroundColor(items[position].PageColor);
             */

            var inflater = LayoutInflater.From(Forms.Context);

            A.View view     = inflater.Inflate(Resource.Layout.listviewpagemodel, null);
            var    lvLayout = view.FindViewById <Android.Widget.ListView>(Resource.Id.ListViewLayout);

            lvLayout.Adapter = new CustomViewWithListAdapter(Forms.Context as Android.App.Activity, rewardsData);



            //imageView.SetImageResource(treeCatalog[position].imageId);
            var viewPager = container.JavaCast <ViewPager>();

            viewPager.AddView(view);
            return(view);
        }
		public override View GetChildView(int groupPosition, int childPosition, bool isLastChild, View convertView, ViewGroup parent) {
			View container = View.Inflate(parent.Context, Resource.Layout.list_item_child, null);
			TextView txtGroupName = (TextView)container.FindViewById(Resource.Id.txtExampleName);
			ExampleFragment child = (ExampleFragment)this.GetChild(groupPosition, childPosition);
			txtGroupName.Text = child.Title();
			return container;
		}
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
			view = inflater.Inflate(Resource.Layout.TeamsFragment, container, false);
			if(listTeams.Count == 0) {
				//display text that there are currently no events and hide list with events
				view.FindViewById(Resource.Id.teamsFragmentListTeams).Visibility = ViewStates.Gone;
			} else {
				//display list with events and hide the text
				view.FindViewById(Resource.Id.teamsFragmentNoTeams).Visibility = ViewStates.Gone;

				listView = view.FindViewById<ListView>(Resource.Id.teamsFragmentListTeams);
				listView.Adapter = new ListTeamsAdapter(this, listTeams);
				listView.ItemClick += OnListItemClick;
			}

			if(DB_Communicator.getInstance().isAtLeast(VBUser.GetUserFromPreferences().getUserType(), UserType.Coremember)) {
				view.FindViewById<LinearLayout>(Resource.Id.teamsFragmentBtnAddLine).Visibility = ViewStates.Visible;
			} else {
				view.FindViewById<LinearLayout>(Resource.Id.teamsFragmentBtnAddLine).Visibility = ViewStates.Gone;
			}

			view.FindViewById<Button>(Resource.Id.teamsFragmentBtnAdd).Click += (object sender, EventArgs e) => {
				ViewController.getInstance().mainActivity.switchFragment(ViewController.TEAMS_FRAGMENT, 
					ViewController.ADD_TEAM_FRAGMENT, new AddTeamFragment());
			};

			return view;
		}
        public override View GetView(Context context, View convertView, ViewGroup parent)
		{
            this.Click = delegate { SelectImage(); };

            Bitmap scaledBitmap = Bitmap.CreateScaledBitmap(_image, dimx, dimy, true);

            var view = convertView as RelativeLayout;
            if (view == null)
            {
                view = new RelativeLayout(context);
                _imageView = new ImageView(context);
            }
            else
            {
                _imageView = (ImageView)view.GetChildAt(0);
            }
            _imageView.SetImageBitmap(scaledBitmap);
            
            var parms = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent);
            parms.SetMargins(5, 2, 5, 2);
            parms.AddRule( LayoutRules.AlignParentLeft);
			if(_imageView.Parent != null && _imageView.Parent is ViewGroup)
				((ViewGroup)_imageView.Parent).RemoveView(_imageView);
			view.AddView(_imageView, parms);

            return view;
		}
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			SetStyle(DialogFragmentStyle.NoTitle, Android.Resource.Style.ThemeTranslucentNoTitleBar);
			Dialog.RequestWindowFeature((int)WindowFeatures.NoTitle);
			var view = inflater.Inflate(Resource.Layout.TrickSelectorPreMenuDialogFragmentLayout, container, false);

			Dialog.Window.SetBackgroundDrawableResource(Resource.Drawable.shape_roundedRect);

			var buttons = new Tuple<ImageView, TrickType>[typeof(TrickType).GetEnumNames().Length + 1];
			var trickFilterButtons = Resources.ObtainTypedArray(Resource.Array.TrickSortButtons_TrickSelector);
			var trickFilterButtonTexts = Resources.ObtainTypedArray(Resource.Array.TrickSortButtonTexts_TrickSelector);
			For(0, buttons.Length, (i) =>
			{
				buttons[i] = Tuple.Create(view.FindViewById<ImageView>(trickFilterButtons.GetResourceId(i, 0)), (TrickType)i);
				view.FindViewById<TextView>(trickFilterButtonTexts.GetResourceId(i, 0)).Typeface = Data.Bowlby_OneSC;
			});

			ForEach(buttons, (button) => button.Item1.Click += delegate
			{
				if (IsListEmpty(button.Item2))
				{
					Toast.MakeText(Activity.BaseContext, Resource.String.NoTricks, ToastLength.Long).Show();
				}
				else
				{
					args.PutInt(Flags.TricksToUse, (int)button.Item2);
					TrickSelectorDialogFragment.newInstance(args).Show(FragmentManager, "tag");
					Dismiss();
				}
			});

			return view;
		}
    public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
      var root = inflater.Inflate(Resource.Layout.fragment_contacts, container, false);

      refresher = root.FindViewById<SwipeRefreshLayout>(Resource.Id.refresher);
      refresher.SetColorScheme(Resource.Color.blue);

      refresher.Refresh += async delegate
      {
        if (viewModel.IsBusy)
          return;

        await viewModel.GetContactsAsync();
        Activity.RunOnUiThread(() => { ((BaseAdapter)listView.Adapter).NotifyDataSetChanged(); });

      };

      viewModel.PropertyChanged += PropertyChanged;

      listView = root.FindViewById<ListView>(Resource.Id.list);

      listView.Adapter = new ContactAdapter(Activity, viewModel);

      listView.ItemLongClick += ListViewItemLongClick;
      listView.ItemClick += ListViewItemClick;
      var fab = root.FindViewById<FloatingActionButton>(Resource.Id.fab);
      fab.AttachToListView(listView);
      fab.Click += (sender, args) =>
      {
        ContactDetailsActivity.ViewModel = null;
        var intent = new Intent(Activity, typeof(ContactDetailsActivity));
        StartActivity(intent);
      };
      return root;
    }
		public override View GetView (Context context, View convertView, ViewGroup parent)
		{
			var view = new RelativeLayout(context);
						
            var parms = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
                                                        ViewGroup.LayoutParams.WrapContent);

            view.SetMinimumHeight(150);
            parms.SetMargins(5, 3, 5, 0);
            parms.AddRule(LayoutRules.AlignParentLeft);

			_caption = new TextView (context);
			SetCaption (Caption);
            view.AddView(_caption, parms);
			
			if (!String.IsNullOrWhiteSpace (Indicator)) {
	            var tparms = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
	                                                         ViewGroup.LayoutParams.WrapContent);
	            tparms.SetMargins(5, 3, 5, 5);
	            tparms.AddRule(LayoutRules.CenterVertical);
				tparms.AddRule(LayoutRules.AlignParentRight);
	
	            _text = new TextView (context) {
					Text = Indicator,
					TextSize = 22f
				};
	            view.AddView(_text, tparms);
			}
			return view;
		}
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			// Use this to return your custom view for this Fragment
			// return inflater.Inflate(Resource.Layout.YourFragment, container, false);

			//	  Lich hoc theo HK
			var rootView = inflater.Inflate (Resource.Layout.LichHoc_HK, container, false);
			isfirst = true;
			listView_HK = rootView.FindViewById<ListView> (Resource.Id.listLH);
			lbl_HK = rootView.FindViewById<TextView> (Resource.Id.lbl_HK_LH);
			lbl_NH = rootView.FindViewById<TextView> (Resource.Id.lbl_NH_LH);
			progress = rootView.FindViewById<ProgressBar> (Resource.Id.progressLH);
			linear = rootView.FindViewById<LinearLayout>(Resource.Id.linear_HK_LH);
			linearLH = rootView.FindViewById<LinearLayout>(Resource.Id.linearLH);
			txtNotify = rootView.FindViewById<TextView>(Resource.Id.txtNotify_LT_HK);
		//	radioGroup = rootView.FindViewById<RadioGroup>(Resource.Id.radioGroup1);
		    bundle=this.Arguments;
			check = bundle.GetBoolean ("Remind");
			autoupdate = bundle.GetBoolean ("AutoUpdateData");

			//load data

			LoadData_HK ();
		
			// row click
			listView_HK.ItemLongClick += listView_ItemClick;
						

			return rootView;
		}
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			// Use this to return your custom view for this Fragment
			// return inflater.Inflate(Resource.Layout.YourFragment, container, false);
		
//  Lich hoc theo HK
//		    var rootView = inflater.Inflate(Resource.Layout.LichHoc_HK, container, false);
//			ListView listView = rootView.FindViewById<ListView>(Resource.Id.listLH);
//
//			var t= BLichHoc.MakeDataFromXml(SQLite_Android.GetConnection ());
//			List<LichHoc> listLH = BLichHoc.GetAll (SQLite_Android.GetConnection ());
//			List<chiTietLH> listCT = new List<chiTietLH> ();
//			foreach (var item in listLH) {
//				listCT.AddRange(BLichHoc.GetCTLH (SQLite_Android.GetConnection (), item.Id));
//
//			}
//	
//
//			LichHocHKAdapter adapter = new LichHocHKAdapter (Activity, listCT);
//			listView.Adapter  = adapter;


			//Theo Tuan
			var rootView = inflater.Inflate(Resource.Layout.LichHoc_Tuan, container, false);
			listView = rootView.FindViewById<ExpandableListView>(Resource.Id.listLH_Tuan);
			progress=rootView.FindViewById<ProgressBar>(Resource.Id.progressLHTuan);


			LoadData ();

		
			return rootView;
		}
	        public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle p2)
			{
				var v = inflater.Inflate(Resource.Layout.hello_world, container, false);
	            var tv = v.FindViewById<TextView>(Resource.Id.text);
	            tv.Text = "This is an instance of MyDialogFragment";
	            return v;
			}
		public CustomInfoWindow (Context context, ViewGroup viewGroup, List<CustomPin> pins)
		{
			_context = context;
			_viewGroup = viewGroup;
			_pins = pins;

		}
 public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 {
     var view = inflater.Inflate(Resource.Layout.BusinessCardFragmentLayout, container, false);
     var listView = view.FindViewById<ListView>(Resource.Id.listViewBusinessCards);
     listView.Adapter = new BusinessCardAdapter (this.Activity);
     return view;
 }
		public override View GetView(Context context, View convertView, ViewGroup parent)
        {
			var view = convertView as RelativeLayout;
			
			if (view == null)
				view = new RelativeLayout(context);
						
            var parms = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
                                                        ViewGroup.LayoutParams.WrapContent);
            parms.SetMargins(5, 3, 5, 0);
            parms.AddRule((int) LayoutRules.AlignParentLeft);

            _caption = new TextView(context) {Text = Caption, TextSize = 16f};
            view.AddView(_caption, parms);

            if (!string.IsNullOrEmpty(Value))
            {
                var tparms = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
                                                             ViewGroup.LayoutParams.WrapContent);
                tparms.SetMargins(5, 3, 5, 0);
                tparms.AddRule((int) LayoutRules.AlignParentRight);

                _text = new TextView(context) {Text = Value, TextSize = 16f};
                view.AddView(_text, tparms);
            }

            return view;
        }
		public override RecyclerView.ViewHolder OnCreateViewHolder (ViewGroup parent, int viewType)
		{	

			View v = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.inflator_layout2,parent,false);
			var vh = new MyViewHolder2(v);
			return vh;
		} 
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			RadCalendarView calendarView = new RadCalendarView (Activity);
			calendarView.CustomizationRule = new DisabledDatesRule (calendarView.Calendar);

			return calendarView;
		}
Beispiel #49
0
        //Returns the view for a specific item on the list
        public override View GetView(int position, Android.Views.View convertView, Android.Views.ViewGroup parent)
        {
//			var row = convertView;
//			var currentItem = this [position];
//			CheckBox checkBox;
//
//			if (row == null) {
//				var inflater = activity.LayoutInflater;
//				row = inflater.Inflate (layoutResourceId, parent, false);
///*
//                checkBox = row.FindViewById<CheckBox>(Resource.Id.beaconId); // fix this
//
//                checkBox.CheckedChange += async (sender, e) => {
//					var cbSender = sender as CheckBox;
//					if (cbSender != null && cbSender.Tag is Prompt.PromptWrapper && cbSender.Checked) {
//						cbSender.Enabled = false;
//                        if (activitie is MainActivity)
//                            //await ((MainActivity)activitie).CheckBeacon((cbSender.Tag as Activities.ActivitiesWrapper).Activities);
//                    }
//				};
//                */
//
//			} else
//				checkBox = row.FindViewById <CheckBox> (Resource.Id.beaconId); //fix this

            //	checkBox.Text = currentItem.Text;
            //	checkBox.Checked = false;
            //	checkBox.Enabled = true;
            //	checkBox.Tag = new ToDoItemWrapper (currentBeacon);

            return(null);
        }
		public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			if (container == null) {
				// Currently in a layout without a container, so no reason to create our view.
				return null;
			}

			var view = inflater.Inflate(Resource.Layout.speaker_screen, container, false);

			var speaker = EvolveData.SpeakerData [ShownSpeakerIndex];

			headshotImageView = view.FindViewById<ImageView> (Resource.Id.headshotImageView);
			var headshot = GetHeadShot (speaker.HeadshotUrl);
			headshotImageView.SetImageDrawable (headshot);

			speakerNameTextView = view.FindViewById<TextView> (Resource.Id.speakerNameTextView);
			speakerNameTextView.Text = speaker.Name;

			companyNameTextView = view.FindViewById<TextView> (Resource.Id.companyNameTextView);
			companyNameTextView.Text = speaker.Company;

			twitterHandleView = view.FindViewById<TextView> (Resource.Id.twitterTextView);
			twitterHandleView.Text = "@" + speaker.TwitterHandle;

			return view;
		}
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var ignore = base.OnCreateView(inflater, container, savedInstanceState);

            var view = this.BindingInflate(FragmentId, null);

            if (Title != string.Empty)
            {
                Activity.Title = Title;
            }

            //TODO: I guess this can be removed?
            toolbar = view.FindViewById<Toolbar>(Resource.Id.toolbar);
            if (toolbar != null)
            {
                ((MainActivity) Activity).SetSupportActionBar(toolbar);
                ((MainActivity) Activity).SupportActionBar.SetDisplayHomeAsUpEnabled(true);

                drawerToggle = new MvxActionBarDrawerToggle(
                    Activity, // host Activity
                    ((MainActivity) Activity).DrawerLayout, // DrawerLayout object
                    toolbar, // nav drawer icon to replace 'Up' caret
                    Resource.String.drawer_open, // "open drawer" description
                    Resource.String.drawer_close // "close drawer" description
                    );

                ((MainActivity) Activity).DrawerLayout.AddDrawerListener(drawerToggle);
            }

            return view;
        }
Beispiel #52
0
        public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate (Resource.Layout.FeedbackFragment, container, false);
            feedbackPositiveButton = view.FindViewById<ImageButton> (Resource.Id.FeedbackPositiveButton);
            feedbackNeutralButton = view.FindViewById<ImageButton> (Resource.Id.FeedbackNeutralButton);
            feedbackNegativeButton = view.FindViewById<ImageButton> (Resource.Id.FeedbackNegativeButton);

            feedbackPositiveButton.Click += (sender, e) => SetRating (ratingPositive);
            feedbackNeutralButton.Click += (sender, e) => SetRating (ratingNeutral);
            feedbackNegativeButton.Click += (sender, e) => SetRating (ratingNegative);

            feedbackMessageEditText = view.FindViewById<EditText> (Resource.Id.FeedbackMessageText).SetFont (Font.Roboto);
            feedbackMessageEditText.AfterTextChanged += OnEdit;

            submitFeedbackButton = view.FindViewById<Button> (Resource.Id.SendFeedbackButton).SetFont (Font.Roboto);
            submitFeedbackButton.Click += OnSendClick;

            feedbackContainer = view.FindViewById<LinearLayout> (Resource.Id.FeedbackContainer);
            disclaimerContainer = view.FindViewById<LinearLayout> (Resource.Id.FeedbackDisclaimer);
            noUserRegisterButton = view.FindViewById<Button> (Resource.Id.FeedbackRegisterButton);

            bool offline = ServiceContainer.Resolve<AuthManager> ().OfflineMode;
            disclaimerContainer.Visibility = offline ? ViewStates.Visible : ViewStates.Gone;
            feedbackContainer.Visibility = offline ? ViewStates.Gone : ViewStates.Visible;

            noUserRegisterButton.Click += OpenRegisterScreen;

            SetRating (userRating);

            return view;
        }
Beispiel #53
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            base.OnCreateView(inflater, container, savedInstanceState);
            var view = inflater.Inflate(Resource.Layout.CallVoice, container, false);

            return view;
        }
Beispiel #54
0
        public override View OnCreateView(Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState)
        {
            var ignored = base.OnCreateView(inflater, container, savedInstanceState);

            var view = this.BindingInflate(Resource.Layout.tab_EmployeeAddress, null);

            return(view);
        }
        private Bitmap ConvertViewToBitMap(Android.Views.ViewGroup view)
        {
            Bitmap bitmap = Bitmap.CreateBitmap(width, height, Bitmap.Config.Argb8888);
            Canvas canvas = new Canvas(bitmap);

            view.Draw(canvas);
            return(bitmap);
        }
            public override void DestroyItem(AViews.ViewGroup container, int position, Java.Lang.Object objectValue)
            {
                var pager = (ViewPager)container;
                var view  = (AViews.ViewGroup)objectValue;

                //view.SaveHierarchyState(mViewStates);
                pager.RemoveView(view);
            }
 public override RecyclerView.ViewHolder OnCreateViewHolder(Android.Views.ViewGroup parent, int viewType)
 {
     if (viewType == SEND_TEXT)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_chat_history_text_send, parent, false);
         return(new GroupSendTextViewHolder(itemView, OnClick, OnLongClick));
     }
     else if (viewType == SEND_IMAGE)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_chat_history_img_send, parent, false);
         return(new GroupSendImageViewHolder(itemView, OnClick, OnLongClick, OnCancelClick));
     }
     else if (viewType == SEND_VIDEO)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_chat_history_video_send, parent, false);
         return(new GroupSendVideoViewHolder(itemView, OnClick, OnLongClick, OnCancelClick));
     }
     else if (viewType == SEND_AUDIO)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_chat_history_voice_send, parent, false);
         return(new GroupSendAudioViewHolder(itemView, OnClick, OnLongClick, OnCancelClick));
     }
     else if (viewType == SEND_PDF)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_chat_history_pdf_send, parent, false);
         return(new GroupSendPdfViewHolder(itemView, OnClick, OnLongClick, OnCancelClick));
     }
     else if (viewType == RECEIVE_TEXT)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_group_history_text_receive, parent, false);
         return(new GroupReceiveTextViewHolder(itemView, OnClick, OnLongClick));
     }
     else if (viewType == RECEIVE_IMAGE)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_group_history_img_receive, parent, false);
         return(new GroupReceiveImageViewHolder(itemView, OnClick, OnLongClick));
     }
     else if (viewType == RECEIVE_VIDEO)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_group_history_video_receive, parent, false);
         return(new GroupReceiveVideoViewHolder(itemView, OnClick, OnLongClick));
     }
     else if (viewType == RECEIVE_AUDIO)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_group_history_voice_receive, parent, false);
         return(new GroupReceiveAudioViewHolder(itemView, OnClick, OnLongClick));
     }
     else if (viewType == RECEIVE_PDF)
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_group_history_pdf_receive, parent, false);
         return(new GroupReceivePdfViewHolder(itemView, OnClick, OnLongClick));
     }
     else//receive text
     {
         View itemView = LayoutInflater.From(ParentActivity).Inflate(Resource.Layout.item_group_history_text_receive, parent, false);
         return(new GroupReceiveImageViewHolder(itemView, OnClick, OnLongClick));
     }
 }
Beispiel #58
0
            public override AView OnCreateView(ALayoutInflater inflater, AViewGroup container, Bundle savedInstanceState)
            {
                ScopedMauiContext = _mauiContext.MakeScoped(layoutInflater: inflater, fragmentManager: ChildFragmentManager, registerNewNavigationRoot: true);
                _ = _window.ToHandler(ScopedMauiContext);
                var rootView = ScopedMauiContext.GetNavigationRootManager().RootView;

                rootView.LayoutParameters = new LinearLayoutCompat.LayoutParams(500, 500);
                return(rootView);
            }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _parent  = null;
         _overlay = null;
         _view    = null;
     }
     base.Dispose(disposing);
 }
        public override View GetView(int position, Android.Views.View convertView, Android.Views.ViewGroup parent)
        {
            var view   = convertView as LinearLayout ?? activity.LayoutInflater.Inflate(Resource.Layout.ViewerItemLayout, null) as LinearLayout;
            var viewer = viewers[position];

            view.FindViewById <TextView>(Resource.Id.usernameTextView).Text = viewer.Name;
            view.FindViewById <TextView>(Resource.Id.rankTextView).Text     = viewer.IsMod ? "moderator" : "";

            return(view);
        }