What I want to do is:
1) Put a transparent panel over the Entire screen (including notification bar)
2) Add another panel to that panel (centered in the panel), with some controls on it to fire off events in my Class (seekbar, buttons... etc)
In looking at possibilitites for this, I need to build a library that lets me do this to one of our Panels (or something similiar, not sure of the details yet because I can't seem to start staying above water):
Here are the LayoutParams I have found work for others at stackoverflow:
I "Think" (gets me in trouble) that this means that if I access our Panel in B4A via the PanelWrapper, that somewhere along the way, eventually their is a call in there that does just that for our Panel (calling the addView function)
When I try to look in Eclipse though, I cannot see where that is happening...
I have reviewed Roger Garstang's library example (awesome by the way) and I see this:
It appears to me their IS a way to get to something within BA that is the LayoutParams I want to adjust.
I just don't SEE it though.
I would think this is a fairly simple (HAHAHA) case of declaring the right kind of variable (I think a Window object) and assigning it the Panel View, but I can't assign a PanelWrapper to a Window. But it appears that LayoutParams are accessible in the BA, but I don't know how to assign the Params that I can declare using the WindowManager.LayoutParams Constructor, without messing up all the other Params that are already declared in the BA.
Ugh.
Any kicks to the.. I mean pointers?
1) Put a transparent panel over the Entire screen (including notification bar)
2) Add another panel to that panel (centered in the panel), with some controls on it to fire off events in my Class (seekbar, buttons... etc)
In looking at possibilitites for this, I need to build a library that lets me do this to one of our Panels (or something similiar, not sure of the details yet because I can't seem to start staying above water):
Here are the LayoutParams I have found work for others at stackoverflow:
B4X:
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
WindowManager.LayoutParams.FLAG_FULLSCREEN,
PixelFormat.TRANSLUCENT);
params.gravity = Gravity.RIGHT | Gravity.TOP;
WindowManager.addView(mOverlayView, params);
I "Think" (gets me in trouble) that this means that if I access our Panel in B4A via the PanelWrapper, that somewhere along the way, eventually their is a call in there that does just that for our Panel (calling the addView function)
When I try to look in Eclipse though, I cannot see where that is happening...
I have reviewed Roger Garstang's library example (awesome by the way) and I see this:
B4X:
if (ba.vg.getParent() instanceof BALayout)
return;
ExtendedBALayout e = new ExtendedBALayout(ba.context, EventPrefix, ba);
ba.activity.setContentView(e);
BALayout.LayoutParams lp = new BALayout.LayoutParams();
lp.height = ba.vg.getLayoutParams().height;
lp.width = ba.vg.getLayoutParams().width;
ba.vg.setLayoutParams(lp);
e.addView(ba.vg);
ba.activity.getWindow().setSoftInputMode(ba.activity.getWindow().getAttributes().softInputMode | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
It appears to me their IS a way to get to something within BA that is the LayoutParams I want to adjust.
I just don't SEE it though.
I would think this is a fairly simple (HAHAHA) case of declaring the right kind of variable (I think a Window object) and assigning it the Panel View, but I can't assign a PanelWrapper to a Window. But it appears that LayoutParams are accessible in the BA, but I don't know how to assign the Params that I can declare using the WindowManager.LayoutParams Constructor, without messing up all the other Params that are already declared in the BA.
Ugh.
Any kicks to the.. I mean pointers?