public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_features, null); CheckBox readOnly = (CheckBox)layoutRoot.FindViewById(Resource.Id.readOnly); readOnly.SetOnCheckedChangeListener(this); dataForm = new RadDataForm(Activity); layoutRoot.AddView(dataForm, 0); person = new Person(); person.AddPropertyChangedListener(this); dataForm.Entity = person; //RangeValidator validator = (RangeValidator) dataForm.GetExistingEditorForProperty("Age").Property().Validator; //validator.Max = new Java.Lang.Integer(30); //validator.Min = new Java.Lang.Integer(18); Spinner commitModes = (Spinner)layoutRoot.FindViewById(Resource.Id.commitModeSpinner); commitModes.Adapter = new ArrayAdapter(Activity, Android.Resource.Layout.SimpleListItem1, CommitMode.Values()); commitModes.OnItemSelectedListener = this; personText = (TextView)layoutRoot.FindViewById(Resource.Id.personText); commitButton = (Button)layoutRoot.FindViewById(Resource.Id.manualCommit); commitButton.Click += (object sender, EventArgs e) => dataForm.CommitChanges(); return(layoutRoot); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_features, null); CheckBox readOnly = (CheckBox)layoutRoot.FindViewById(Resource.Id.readOnly); readOnly.SetOnCheckedChangeListener(this); dataForm = Android.Runtime.Extensions.JavaCast <RadDataForm>(layoutRoot.FindViewById(Resource.Id.dataForm)); person = new Person(); person.AddPropertyChangedListener(this); dataForm.SetEntity(person); RangeValidator validator = (RangeValidator)dataForm.GetExistingEditorForProperty("Age").Property().Validator; validator.Max = 30; validator.Min = 18; Spinner commitModes = (Spinner)layoutRoot.FindViewById(Resource.Id.commitModeSpinner); commitModes.Adapter = new ArrayAdapter(this.Activity, Android.Resource.Layout.SimpleSpinnerItem, CommitMode.Values()); commitModes.OnItemSelectedListener = this; personText = (TextView)layoutRoot.FindViewById(Resource.Id.personText); commitButton = (Button)layoutRoot.FindViewById(Resource.Id.manualCommit); commitButton.SetOnClickListener(this); return(layoutRoot); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_features, null); CheckBox readOnly = (CheckBox)layoutRoot.FindViewById(Resource.Id.readOnly); readOnly.SetOnCheckedChangeListener(this); dataForm = new RadDataForm (Activity); layoutRoot.AddView (dataForm, 0); person = new Person(); person.AddPropertyChangedListener(this); dataForm.Entity = person; //RangeValidator validator = (RangeValidator) dataForm.GetExistingEditorForProperty("Age").Property().Validator; //validator.Max = new Java.Lang.Integer(30); //validator.Min = new Java.Lang.Integer(18); Spinner commitModes = (Spinner)layoutRoot.FindViewById(Resource.Id.commitModeSpinner); commitModes.Adapter = new ArrayAdapter(Activity, Android.Resource.Layout.SimpleListItem1, CommitMode.Values()); commitModes.OnItemSelectedListener = this; personText = (TextView)layoutRoot.FindViewById(Resource.Id.personText); commitButton = (Button) layoutRoot.FindViewById(Resource.Id.manualCommit); commitButton.Click += (object sender, EventArgs e) => dataForm.CommitChanges(); return layoutRoot; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_features, null); CheckBox readOnly = (CheckBox)layoutRoot.FindViewById(Resource.Id.readOnly); readOnly.SetOnCheckedChangeListener(this); dataForm = Android.Runtime.Extensions.JavaCast<RadDataForm>(layoutRoot.FindViewById(Resource.Id.dataForm)); person = new Person(); person.AddPropertyChangedListener(this); dataForm.SetEntity (person); RangeValidator validator = (RangeValidator) dataForm.GetExistingEditorForProperty("Age").Property().Validator; validator.Max = 30; validator.Min = 18; Spinner commitModes = (Spinner)layoutRoot.FindViewById(Resource.Id.commitModeSpinner); commitModes.Adapter = new ArrayAdapter(this.Activity, Android.Resource.Layout.SimpleSpinnerItem, CommitMode.Values()); commitModes.OnItemSelectedListener = this; personText = (TextView)layoutRoot.FindViewById(Resource.Id.personText); commitButton = (Button) layoutRoot.FindViewById(Resource.Id.manualCommit); commitButton.SetOnClickListener(this); return layoutRoot; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_features, null); CheckBox readOnly = (CheckBox)layoutRoot.FindViewById(Resource.Id.readOnly); readOnly.SetOnCheckedChangeListener(this); dataForm = Android.Runtime.Extensions.JavaCast<RadDataForm>(layoutRoot.FindViewById(Resource.Id.dataForm)); dataForm.LayoutManager = new DataFormLinearLayoutManager (this.Activity); person = new Person(); person.AddPropertyChangedListener(this); dataForm.Entity = new XamarinEntity(person); DataFormSpinnerEditor editor = Android.Runtime.Extensions.JavaCast<DataFormSpinnerEditor> (dataForm.GetExistingEditorForProperty("EmployeeType")); editor.Adapter = new Com.Telerik.Widget.Dataform.Visualization.Editors.Adapters.EditorSpinnerAdapter (this.Activity, new Java.Lang.Object[] { "PROGRAMMER", "MANAGER", "SUPPORT", "MARKETING" }); RangeValidator validator = (RangeValidator) dataForm.GetExistingEditorForProperty("Age").Property().Validator; validator.Max = 30; validator.Min = 18; Spinner commitModes = (Spinner)layoutRoot.FindViewById(Resource.Id.commitModeSpinner); commitModes.Adapter = new ArrayAdapter(this.Activity, Android.Resource.Layout.SimpleSpinnerItem, CommitMode.Values()); commitModes.OnItemSelectedListener = this; personText = (TextView)layoutRoot.FindViewById(Resource.Id.personText); commitButton = (Button) layoutRoot.FindViewById(Resource.Id.manualCommit); commitButton.SetOnClickListener(this); return layoutRoot; }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup layoutRoot = (ViewGroup)inflater.Inflate(Resource.Layout.fragment_dataform_features, null); CheckBox readOnly = (CheckBox)layoutRoot.FindViewById(Resource.Id.readOnly); readOnly.SetOnCheckedChangeListener(this); dataForm = Android.Runtime.Extensions.JavaCast <RadDataForm>(layoutRoot.FindViewById(Resource.Id.dataForm)); dataForm.LayoutManager = new DataFormLinearLayoutManager(this.Activity); person = new Person(); person.AddPropertyChangedListener(this); dataForm.Entity = new XamarinEntity(person); DataFormSpinnerEditor editor = Android.Runtime.Extensions.JavaCast <DataFormSpinnerEditor> (dataForm.GetExistingEditorForProperty("EmployeeType")); editor.Adapter = new Com.Telerik.Widget.Dataform.Visualization.Editors.Adapters.EditorSpinnerAdapter(this.Activity, new Java.Lang.Object[] { "PROGRAMMER", "MANAGER", "SUPPORT", "MARKETING" }); RangeValidator validator = (RangeValidator)dataForm.GetExistingEditorForProperty("Age").Property().Validator; validator.Max = 30; validator.Min = 18; Spinner commitModes = (Spinner)layoutRoot.FindViewById(Resource.Id.commitModeSpinner); commitModes.Adapter = new ArrayAdapter(this.Activity, Android.Resource.Layout.SimpleSpinnerItem, CommitMode.Values()); commitModes.OnItemSelectedListener = this; personText = (TextView)layoutRoot.FindViewById(Resource.Id.personText); commitButton = (Button)layoutRoot.FindViewById(Resource.Id.manualCommit); commitButton.SetOnClickListener(this); return(layoutRoot); }