How to override popup width with the width of anchor view?
NapasPayu opened this issue · 3 comments
NapasPayu commented
I would like to show a Popup Menu with the same width of anchor view. Is it possible to do so?
zawadz88 commented
Hi,
The library does not support it currently. According to the Material spec it uses increments of 56dp instead.
However, I can see that having a custom width can be sometimes useful so this would be a nice enhancement.
I'll gladly accept any PRs regarding this if anyone wants to contribute :)
zawadz88 commented
Hi @NapasPayu,
I've created a proof of concept for this behaviour:
Is that what you had in mind?
Please note that this is just a proposal - I haven't updated unit tests and only tested this on API 27. There's still more work to be done ;)
zawadz88 commented
Sample added in 4.0.0 together with new APIs to make this happen.