public override void OnProvideAutofillVirtualStructure(ViewStructure structure, AutofillFlags flags) { // Build a ViewStructure that will get passed to the AutofillService by the framework // when it is time to find autofill suggestions. structure.SetClassName(Class.Name); var childrenSize = VirtualViews.Size(); Log.Debug(LogTag, "onProvideAutofillVirtualStructure(): flags = " + flags + ", items = " + childrenSize + ", extras: " + CommonUtil.BundleToString(structure.Extras)); var index = structure.AddChildCount(childrenSize); // Traverse through the view hierarchy, including virtual child views. For each view, we // need to set the relevant autofill metadata and add it to the ViewStructure. for (int i = 0; i < childrenSize; i++) { Item item = VirtualViews.ValueAt(i); Log.Debug(LogTag, "Adding new child at index " + index + ": " + item); var child = structure.NewChild(index); child.SetAutofillId(structure.AutofillId, item.Id); child.SetAutofillHints(item.Hints); child.SetAutofillType(item.Type); child.SetDataIsSensitive(!item.Sanitized); child.Text = item.Text; child.SetAutofillValue(AutofillValue.ForText(item.Text)); child.SetFocused(item.Focused); child.SetId(item.Id, Context.PackageName, null, item.Line.IdEntry); child.SetClassName(item.getClassName()); index++; } }
public ActionResult ViewStructure() { Session["UserName"] = @User.Identity.Name; //Session["UserName"] = "******"; this._UserName = Session["UserName"] as string ?? ""; if (_UserName == null || _UserName.Equals(String.Empty)) { ViewBag.ErrorMessage = "You must be logged in to continue."; return(RedirectToAction("AwaitingMyApproval", "AwaitingApproval")); } ViewStructure viewStructure = new ViewStructure { BranchName = SelectListItemHelper.GetBranches() }; if (TempData["viewStructure"] != null) { viewStructure = TempData["viewStructure"] as ViewStructure; viewStructure.BranchName = SelectListItemHelper.GetBranches(); } ViewBag.ErrorMessage = TempData["ErrorMessage"] as String ?? String.Empty; return(View(viewStructure)); }
public ActionResult ViewStructure(ViewStructure viewStructure) { //Now let's get the Approvers for the Selected branch IEnumerable <IEnumerable <AppraisalApproverModel> > branchStructure = LINQCalls.getOrgStructure(viewStructure.SelectedBranch); branchStructure = branchStructure.OrderByDescending(c => c.First().RoleID); viewStructure.AppraisalApproverModel = branchStructure; TempData["viewStructure"] = viewStructure; return(RedirectToAction("ViewStructure", "OrgStructure")); }
public override void OnProvideAutofillVirtualStructure(ViewStructure structure, AutofillFlags flags) { // Build a ViewStructure that will get passed to the AutofillService by the framework // when it is time to find autofill suggestions. structure.SetClassName(Class.Name); int childrenSize = mVirtualViews.Size(); if (DEBUG) { Log.Debug(TAG, "onProvideAutofillVirtualStructure(): flags = " + flags + ", items = " + childrenSize + ", extras: " + CommonUtil.BundleToString(structure.Extras)); } int index = structure.AddChildCount(childrenSize); // Traverse through the view hierarchy, including virtual child views. For each view, we // need to set the relevant autofill metadata and add it to the ViewStructure. for (int i = 0; i < childrenSize; i++) { var item = mVirtualViews.ValueAt(i); if (DEBUG) { Log.Debug(TAG, "Adding new child at index " + index + ": " + item); } var child = structure.NewChild(index); child.SetAutofillId(structure.AutofillId, item.id); child.SetAutofillHints(item.hints); child.SetAutofillType(item.type); child.SetAutofillValue(item.GetAutofillValue()); child.SetDataIsSensitive(!item.sanitized); child.SetFocused(item.focused); child.SetVisibility(ViewStates.Visible); child.SetDimens(item.line.mBounds.Left, item.line.mBounds.Top, 0, 0, item.line.mBounds.Width(), item.line.mBounds.Height()); child.SetId(item.id, Context.PackageName, null, item.idEntry); child.SetClassName(item.GetClassName()); child.SetDimens(item.line.mBounds.Left, item.line.mBounds.Top, 0, 0, item.line.mBounds.Width(), item.line.mBounds.Height()); index++; } }