I have created a sliding layout using the Umano code: https://github.com/umano/AndroidSlidingUpPanel
It works perfectly, but I have one problem. My panel should be partly transparent, so the original view is still visible when it's up.
The view background is set properly to #64000000, but it is still completely opaque and nothing can be seen behind it.
Here's the code:
<com.sothree.slidinguppanel.SlidingUpPanelLayout
android:id="@+id/sliding_up_panel"
android:layout_height="match_parent"
android:layout_width="match_parent">
<ImageView
android:layout_height="match_parent"
android:layout_width="match_parent"
android:scaleType="fitCenter"
android:id="@+id/images_gallery_image" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="#64000000">
<!-- MY STUFF (transparent stuff) -->
</RelativeLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
I thought maybe the issue is caused by hiding of UI elements underneath the expanded panel, so I tried to play around in the library code, but it doesn't seem to be related.
While debugging, I have noticed that hasOpaqueBackground(View v) in line 355 of the library does return false, as expected - but the view still is opaque.
The support for this has been added in the library. Just set overlay
attribute to true, and set the color of the panel to transparent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With