Make sure layout
has a background with rounded corners.
Kotlin
layout.outlineProvider = ViewOutlineProvider.BACKGROUND
layout.clipToOutline = true
Java
layout.setOutlineProvider(ViewOutlineProvider.BACKGROUND);
layout.setClipToOutline(true);
More Related Contents:
- InflateException: Binary XML file line #1: Error inflating class caused by OutOfMemoryError
- Using custom font in android TextView using xml
- Android: How to push button above soft keyboard
- How is using OnClickListener interface different via XML and Java code? [duplicate]
- Hiding ‘Bottom Navigation Bar’ whilst keyboard is present – Android
- Been staring at my code for an hour and still can't see the issue. Android – Java development [closed]
- View’s getWidth() and getHeight() returns 0
- How to parse XML using the SAX parser
- Android custom Row Item for ListView
- How to add a TextView to LinearLayout in Android
- The following classes could not be instantiated: – android.support.v7.widget.Toolbar
- How to group a 3×3 grid of radio buttons?
- getHeight returns 0 for all Android UI objects
- Change background color of single specific menu items of navigationView
- Android – Change app Theme on onClick [duplicate]
- What are WindowInsets?
- AlertDialog with custom view: Resize to wrap the view’s content
- Android change Material elevation shadow color
- How to set menu to Toolbar in Android
- how to update xml file from another xml file dynamically?
- How to programmatically add views and constraints to a ConstraintLayout?
- Android: why setVisibility(View.GONE); or setVisibility(View.INVISIBLE); do not work
- Custom Progress Bar in Android? [closed]
- Is it possible to use VectorDrawable in Buttons and TextViews using android:DrawableRight?
- Bold words in a string of strings.xml in Android
- Make a ProgressBar update smoothly
- Android Failed to instantiate one or more classes
- Android Studio layout editor cannot render custom views
- Error inflating class android.support.design.widget.TabLayout
- Different design for landscape and portrait orientation android