Reputation: 36007
I have a scrollable EdiText with padding but as you know, when you scroll the text inside the EditText, it gets clipped off by the padding instead of overlapping it.
The EditText doesn't have the clipToPadding option. Is there a way to mimic clipToPadding="false" feature which is available in the ViewGroup?
Upvotes: 8
Views: 913
Reputation: 111
This is a bit hacky, but you can add a transparent shadow with a shadow radius equal to the bottom padding.
e.g.
editText.setShadowLayer(editText.extendedPaddingBottom.toFloat(), 0f, 0f, Color.TRANSPARENT)
Upvotes: 11