Sucks to have to ask this here but I don't know where else to go.
I'm trying to build a simple layout for this simple gimmick drawing app. My intent is to make the colour palette visible when you touch the pencil button - it's too big not to overlap the canvas. You'd swipe up to your colour and release.
I can't figure out how to position the Grid View palette above the pencil button. The palette needs to be in the top-level RelativeLayout to overlap the canvas, but the controls are on a deeper level of LinearLayouts, and I can't relate to them. If I replace the pencil button with a layout containing the palette and the button, the bounding box for the controls will change to avoid overlapping with the canvas.
I can see the merits of android's XML layout principles but it's so fucking hard to do something so fucking simple
>>60989732
if(pencil)=true
printscrn(“red”);
if(pencil)=false
printscrn(“transparent”);
>>60989732
Maybe add a callback in your java code that shows the palette?
>>60989732
XML and java are pretty stright foward. Can you post your code?
>>60989806
>>60989838
Changing its visibility is easy, sorry if that wasn't clear.
I just need to position it in the right place - above and vertically centred with the pencil button.
>>60989842
These are the elements I have, in the order I'm currently trying them.
At the moment I can't even get the color palette grid to draw its members, which is apparently purely a layout problem since I haven't played with the java since I took that op screenshot
>>60989939
I'm gathering that the grid can't be drawn outside its parent layout, which is the relative layout, which can't overlap the canvas because it's currently in the linearlayout of controls.
But if I use the relative layout to overlap the canvas so I can draw the grid, I can't position the grid above the button because they're no longer in the same layout.
I can't really take the button out of the control linearlayout, because that rather defeats the point, and I'd then have no way of getting the button in the right place.