public TableViewOld(Activity context, TableController controller) : this() { this.controller = controller; this.parentActivity = context; table_view = context.LayoutInflater.Inflate(Resource.Layout.TableLayoutOld, null); tableView = table_view.FindViewById <TableLayout>(Resource.Id.table_data); column_row_view = table_view.FindViewById <TableRow>(Resource.Id.columnRow); deleteButton = table_view.FindViewById <ImageButton>(Resource.Id.deleteButton); deleteButton.SetOnClickListener(this); tableName = table_view.FindViewById <EditText>(Resource.Id.nameEdit); nameListener = new NameChangeListener(this); tableName.AddTextChangedListener(nameListener); checkBoxView = new CheckBox(context); onCheckedListener = new OnCheckedListener(this); checkBoxView.SetOnCheckedChangeListener(onCheckedListener); column_row_view.AddView(checkBoxView); View dummy = new View(context); column_row_view.AddView(dummy); //controller.HookView(this); }
public TableModel() { rows = new List <RowModel>(); filteredRows = new List <RowModel>(); columns = new List <ColumnModel>(); filters = new List <FilterStruct>(); sorts = new List <SortStruct>(); controller = new TableController(this); sortController = new SortController(this); filterController = new FilterController(this); columnListener = new ColumnChangeListener(this); rowListener = new RowChangeListener(this); nameListener = new NameChangeListener(this); rowDataListener = new RowDataListener(this); }
public void SetTable(DatabaseReference table, DatabaseReference tableName) { consume_name_update = false; if (databaseTable != null) { UnbindListeners(); } databaseTable = table; tableNameData = tableName; this.name = "somename"; columnListener = new ColumnChangeListener(this); rowListener = new RowChangeListener(this); nameListener = new NameChangeListener(this); rowDataListener = new RowDataListener(this); columns.Clear(); foreach (RowModel model in rows) { model.UnbindListeners(); } rows.Clear(); controller.NotifyViewCleared(); tableNameData.AddValueEventListener(nameListener); tableRowData = databaseTable.Child("row_data").Child("new_row_id"); tableRowData.AddValueEventListener(rowDataListener); //load columns databaseColumns = databaseTable.Child("columns"); databaseColumns.AddChildEventListener(columnListener); //load rows databaseRows = databaseTable.Child("rows"); databaseRows.AddChildEventListener(rowListener); }
public ColumnViewText(Activity context, ColumnController controller) : base(context, controller) { nameListener = new NameChangeListener(this); MainView = context.LayoutInflater.Inflate(Resource.Layout.ColumnEditView, null, false); MainView.FindViewById <FrameLayout>(Resource.Id.frameLayoutViewName).AddView(column_view); column_view.AddTextChangedListener(nameListener); ImageView image = MainView.FindViewById <ImageView>(Resource.Id.imageViewColumnType); image.SetScaleType(ImageView.ScaleType.FitXy); image.SetImageResource(Resource.Drawable.icons_text_30); image.SetColorFilter(Color.White); backgroundShape = new GradientDrawable(); backgroundShape.SetColor(DatabaseController.colors[Math.Abs(column_view.Text.GetHashCode()) % DatabaseController.colors.Length].ToArgb()); backgroundShape.SetCornerRadius(10); image.Background = backgroundShape; image.SetOnClickListener(this); }
public ColumnViewChoice(Activity context, ColumnController controller) : base() { nameListener = new NameChangeListener(this); this.context = context; this.controller = controller; column_view = new EditText(context); MainView = context.LayoutInflater.Inflate(Resource.Layout.ColumnEditView_Choice, null, false); MainView.Clickable = false; MainView.Focusable = false; MainView.FindViewById <FrameLayout>(Resource.Id.frameLayoutViewName).AddView(column_view); column_view.AddTextChangedListener(nameListener); ImageView image = MainView.FindViewById <ImageView>(Resource.Id.imageViewColumnType); image.SetImageResource(Resource.Drawable.icons_menu_32); image.SetScaleType(ImageView.ScaleType.FitXy); image.SetColorFilter(Color.White); backgroundShape = new GradientDrawable(); backgroundShape.SetColor(DatabaseController.colors[Math.Abs(column_view.Text.GetHashCode()) % DatabaseController.colors.Length].ToArgb()); backgroundShape.SetCornerRadius(image.Height / 3); image.Background = backgroundShape; image.SetOnClickListener(this); options = MainView.FindViewById <LinearLayout>(Resource.Id.linearLayoutOptions); ImageButton addButton = MainView.FindViewById <ImageButton>(Resource.Id.imageButtonAddOption); addButton.SetOnClickListener(this); controller.HookView(this); }
public DatabaseEditActivity() { nameListener = new NameChangeListener(this); databaseListener = new SchemaListener(this); }
public TableEditActivity() { nameListener = new NameChangeListener(this); colorListener = new ColorListener(this); }
public WorkspaceSchemaEditActivity() : base() { namelistener = new NameChangeListener(this); schemaListener = new SchemaListener(this); }