Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to design a gridview in gl
    primarykey
    data
    text
    <p>Ok I couldn't figure out how to word this in a decent fashion so I will propose it as a "How would you?".</p> <p>I have an app that connects to a service that interfaces all of the data to one main activity. The activity is split in two by a sliding drawer. To top part of the drawered activity is just some buttons that help set up the app and act as a main menu to quickly get anywhere.</p> <p>The bottom (revealed by drawer click) is the heart of the app, a gl window that display 9 benches that hold 6 widgets each. The widgets display useful data and must be able to be moved around freely and longclicked to open an options menu.</p> <p>This is where my problem is, I was using a gridview to hold the widgets, but now that I'm using GL for the benches and the touch listener, I don't know how to overlay the gridview to the benches and still keep the touch movement alive for the the GL window AND still be able to interact with the gridview.</p> <p>This leaves me asking for anyone's oppinion on how to go about this. At this point the only option I have is to figure out how to make ALL of the widgets (even though some may even be a bar graph) in gl. I would rather not do that since gl and I don't work nicely with one another. But I really can't figure out how to integrate these features and still make it functional. Any Ideas?!</p> <p>CONVERTING GRIDVIEW TO BITMAP</p> <p>This method is in my extension of gridview (WorkBench). Essentially what I'm doing is walking through an array of gridviews collecting the bitmaps of each view and then setting the bitmap as the texture to the panels.</p> <p>The toBitmap from the WorkBench class</p> <pre><code>public Bitmap toBitmap() { int x = getWidth(); int y = getHeight(); Bitmap b = Bitmap.createBitmap(x, y, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(); canvas.setBitmap(b); draw(canvas); return b; } </code></pre> <p>And here is where I init the WorkBenches</p> <pre><code>LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); for (int i = 0; i &lt; mWB.length; i++) { mWB[i] = mBoundService.createBench(ARMHomescreen.this, i+""); mWB[i].setLayoutParams(lp); } </code></pre> <p>Whats happening is the WorkBenches dimensions are never being set, regardless of whether I use a LayoutParam or set the size in the toBitmap method...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload