Comments (10)
That should work out of box actually, need to check. I'll try to add more tests to cover these situations. Contributions are also very welcome.
from dialogplus.
OK. So I've managed to get the animation with a complex gravity but now what if I want to show a card, with space either side? Am trying to tinker with the layout params in the DialogPlus class. Any ideas?
from dialogplus.
You can use
.setMargin
//or
.setPadding
from dialogplus.
I know that, but the problem is, is that by default the custom view takes up the whole width of the screen regardless of whether you use wrap_content of not in the layout XML. I want it to show up like a card with transparent space either side. I've changed this in getContentParams so that it uses a separate params object and width param as WRAP_CONTENT rather than MATCH_PARENT. Try changing content2.xml root's height to WRAP_CONTENT and set background resource id to transparent in the sample app to see what I mean.
It works in my case but breaks everything else. Either we can use the width and height params from the root of the custom view or we could put a switch in to it to say match_parent on the custom view.
from dialogplus.
This is what I have at the moment:
from dialogplus.
I get it now, no unfortunately this overlay will be shown all the time, I was expecting to have a PR for this feature to be able to change the background.
from dialogplus.
Which background? Can't you already change the background. I'd like to show
you what I mean by an example. Is a PR the best way to do that?
from dialogplus.
I was assuming that you are talking about the background color with transparency?
from dialogplus.
No, I didn't mean that only. I can do that easily by using setBackgroundResourceId(android.R.color.transparent). When you do that, it doesn't behave in the way expected. Here's the PR to avoid the crash with a composite gravity #80
from dialogplus.
Closing this issue since a merged PR solves the issue.
from dialogplus.
Related Issues (20)
- show view on top above dialog plus
- dismiss dialog and open other dialog error HOT 6
- Open dialog in top of the view but it's not allow me to tap on button
- Why use contentView?
- DatePicker month switch arrows doesn't work
- How to make the this dialog to slide up without fading the screen ? HOT 1
- Blinking after dialog close
- Add property to define if the dialog should request focus or not
- 二级 Dialog 不展示,The second dialog does not show HOT 4
- Display dusnuss of show needs to be optimized 显示关闭逻辑一行优化
- onBackPressed not working when focus on edittext in dialog
- Customization HOT 1
- Dynamically change a popover content
- view's Item null in adapter HOT 1
- textbox settext not updating before dialog load
- Change dialog height dynamically
- setOnItemClickListener is not working
- Multi dialog without dismiss
- Dialogue
- UX on Mode Night HOT 2
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 dialogplus.