[grid] Started refactoring grid into proper layout
It became clear when implementing more complicated interaction that the layout refactoring I had planned needed to be done sooner than later. This is the first chunk of work to abstract layout into adapter classes, and grid is the first such adapter. I am leaving list support in-place confined in the view for now until layout is finished so there are no list regressions. Therefore I have sprinkled many FIXME's about layout and what should be obsolete in the future. Eventually list support will become a layout adapter and column, header, and renderers will move into the layout. It's possible that the column controller will be made obsolete entirely. So what is all of this layout stuff? The list view was always fairly simple, and layout (how things are positioned on screen) was computed on the go during the rendering phase. This presents a major problem though with more complicated layouts since layout essentially has to be computed on render and any sort of interaction, though it was never a big deal with list. So now the layout is computed and cached when things change: - the view allocation changes - the view is scrolled - the model size changes - hamburgers This allows the rendering and interaction phases to simply iterate the layout's children to render children on screen or interact with them. Life is easier and cleaner. So rendering is now mostly complete for grid, there are a few glitches. Interaction doesn't work at all anymore, but it'll come next. I was thinking about the epic burger I had last night: - 1/2 lb burger patty - 1 grilled chicken filet - layer of fried mac and cheese - layer of bacon - layer of swiss cheese - buffalo sauce - mayo - grilled onions It was life changing. Or maybe validating. Or something. But the big problem with this burger was the mess, and on top of that, I really wanted two of these beasts. So what I am going to do in the future is make a casserole of these burgers. Top the dish off with cheese and maybe some cracker crumbles or something and bake shortly. Yes.
parent
37b24663
Please register or sign in to comment