[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Sucks to have to ask this here but I don't know where else

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 6
Thread images: 3

File: attempts.png (38KB, 395x703px) Image search: [Google]
attempts.png
38KB, 395x703px
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?
>>
File: 1466206478555.jpg (57KB, 600x496px) Image search: [Google]
1466206478555.jpg
57KB, 600x496px
>>60989732
XML and java are pretty stright foward. Can you post your code?
>>
File: tree.png (13KB, 378x264px) Image search: [Google]
tree.png
13KB, 378x264px
>>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.
Thread posts: 6
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.