AnimatedTabLayout icon indicating copy to clipboard operation
AnimatedTabLayout copied to clipboard

Android P Bug with squared tabs

Open Akshshr opened this issue 5 years ago • 3 comments

image

Just updated to official release version of Android P, the tabs are all squared.

Akshshr avatar Aug 07 '18 08:08 Akshshr

I have the same issue, is possible to fix that?

fgnm avatar Oct 25 '19 21:10 fgnm

I've fixed the issue by applying to AnimatedTabItemView an ViewOutlineProvider as described here: https://github.com/android/user-interface-samples/tree/master/ClippingBasic

This is the inner class I've made in AnimatedTabItemView:

 private inner class ClipOutlineProvider : ViewOutlineProvider() {
        override fun getOutline(view: View, outline: Outline) {
            outline.setRoundRect(0, 0, mWidth.toInt(),
                    mHeight.toInt(), radius)
        }
    }

And set it in init(...) function:

outlineProvider = ClipOutlineProvider()
clipToOutline = true

This is however a common issue with Android P: https://issuetracker.google.com/issues/111819103#comment5

fgnm avatar Oct 26 '19 09:10 fgnm

The issue has be solved in #13. Use this instead, implementation 'com.github.iammert:AnimatedTabLayout:-SNAPSHOT'

supersu-man avatar Aug 02 '21 19:08 supersu-man