Comments (12)
By default, the sliding content part doesn't overlap the main content. The main content actually has a bottom margin of the height of the sliding panel. So what you are seeing is the white background of your outer relative layout - try changing that.
from androidslidinguppanel.
Can someone provide an example? I can't figure this out. I get a solid background color for my dragger view, but transparency won't work...
from androidslidinguppanel.
I have the same problem. I tried change to transparent color all views, but didn't work.
When fixed, please let me know.
from androidslidinguppanel.
A sample would indeed be very helpful.
Is the manipulation of the view margin part of the DragViewHelper or do you manually calculate the bounds of the main view?
from androidslidinguppanel.
Post your layout, it would be easier to notice what you are doing wrong.
The bounds of the main view are manually calculated based on the height of the sliding panel.
from androidslidinguppanel.
Based on your hint I fixed it myself. For everyone interested in drawing behind the slider, simply change the protected boolean drawChild(final Canvas canvas, final View child, final long drawingTime)
method to not clip the bounds of the canvas:
if (!mDrawBehind && mCanSlide && !lp.slideable && mSlideableView != null) {
// Clip against the slider; no sense drawing what will immediately be covered.
canvas.getClipBounds(mTmpRect);
mTmpRect.bottom = Math.min(mTmpRect.bottom, mSlideableView.getTop());
canvas.clipRect(mTmpRect);
if (mSlideOffset < 1) {
drawScrim = true;
}
}
The new mDrawBehind
variable allows to always draw the background when set to true.
from androidslidinguppanel.
Thanks you for your open Source!
Have a plan support 'Transparent'?
********* I reslove.
in XML, layout Backgorund transparent color change,
I edit slidingUpPanelLayout.java
protected boolean drawChild(Canvas canvas, View child, long drawingTime)
canvas.clipRect(mTmpRect); <~ this line delete
And Trasparent well. Thanks.
from androidslidinguppanel.
Hi I have commented the line
canvas.clipRect(mTmpRect); in my code, but the layout bcomes transparent only when its expanded.
When the layout is collapsed it is not transparent.
I have modified the code so that the panel slides to 0.5f. i.e half of the screen
Why so???
Please refer the images.
Thanks in Advance.
from androidslidinguppanel.
Please refer the above images.
from androidslidinguppanel.
Hi ,
SlidingUpPanelLayout needs to have 2 children . My requirement is that the PeekingOut height of 2nd child should be transparent. This works fine if the first child is an Imageview or Text view, but if the first child is LinearLayout with its own children then we get a white background for the PeekingOut height as can be seen from the images i have uploaded before.
Can anyone help me to find a solution to make that white background transparent.
Thanks in advance!
from androidslidinguppanel.
Thanks ShakeJ.
Actually the margin for 1st child was causing the problem.
Resolved it by removing the margin.
from androidslidinguppanel.
Transparency support has been added in da90ba7. You should simply set overlay
to true, and then change the background color of the sliding child to whatever you desire.
from androidslidinguppanel.
Related Issues (20)
- Cause: org/gradle/api/tasks/testing/AbstractTestTask
- java.lang.IllegalArgumentException happened occasionally
- Very Good HOT 1
- Scroll RecyclerView when panel is at Anchored Point HOT 2
- Slideable view - margin left and right
- Question: Is there an easy way to dismiss panel when user taps on main content? HOT 1
- DrawerLayout with SlidingUpPanel doesn't fit system windows HOT 1
- Ridiculous bug. Panel refuses to expand!
- default grey line on top of sliding panel which needs to expand or collapsed HOT 1
- 🔴🔴🔴 IMP Repo seems dead, New commits at https://github.com/hannesa2/AndroidSlidingUpPanel/
- Black space between main and draggable content on new Samsung devices
- mLastMotionY 数组越界问题
- Change position of a specific view in SlidingUpPanel Layout. HOT 1
- Rounded Corners at the top
- SlidingUpPanel with BottomNavigation Help ....
- never recalculate the layout height after replace it programmatically
- com.sothree.slidinguppanel.SlidingUpPanelLayout.onMeasure (SlidingUpPanelLayout.java:803)
- Build Analyzer found problems for update to AndroidX (Jetifier)
- Avoid panel collapsewhen click in screen. HOT 2
- Drawable drawable/above_shadow has unresolved theme attributes! Consider using Resources.getDrawable(int, Theme) or Context.getDrawable(int). HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidslidinguppanel.