-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set background of sliding up panel to transparent #4
Comments
You need to set the background in the views that it contains and not the in SlidingUpPanelLayout itself. |
@tokudu I have tried this with the first child but only the colour changes to something more greyish, but nothing can be seen underneath. Is there anything else that needs to be done (besides alpha & background on the xml?) |
Can you post your complete layout? |
I'm also having this problem of not being able to set the sliding panel to be transparent. Using the demo application included in your download, I changed the background to transparent of all the child elements in the sliding panel linear layout. I would expect that the words "Main Content" to be visible through the sliding panel now. But that isn't the case. The sliding panel is still opaque white underneath the transparent child elements. |
I managed to do this by commenting out canvas.clipRect(mTmpRect); in the drawChild method and setting a ARGB (#80FFFFFF) colour to the 2nd child layout of the sliding up panel in my layout xml . The sliding up panel, was clipping the rest of the view to save unnecessarily redrawing the layout behind it. |
@domji84 solution worked for me too. I'm using a gradient drawable as background. It's doesn't look like the commented line broke anything. |
@dominicthomas worked for me as well but I can see some black color behind! |
You need to set umanoOverlay="true" to make sliding panel overlay main content. |
@dominicthomas, also worked for me. Thanks. But how can we add umanoFadeColor to all the first child, because when we make sliding layout transparent, part of the first child is under the umanoFadeColor attribute, and some part is not. |
@DinhPhucTran thanks bro..i just stucked from 3 days to resolve that bug |
I have tried to set android:background="#00000000 in following code.
or set the same code on the layout (for example, RelativeLayout) whitch is inner SlidingUpPanelLayout, but the background is still white.
How do I write the code to make background transparent?
The text was updated successfully, but these errors were encountered: