Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android P Bug with squared tabs #8

Open
Akshshr opened this issue Aug 7, 2018 · 3 comments
Open

Android P Bug with squared tabs #8

Akshshr opened this issue Aug 7, 2018 · 3 comments

Comments

@Akshshr
Copy link

Akshshr commented Aug 7, 2018

image

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

@fgnm
Copy link

fgnm commented Oct 25, 2019

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

@fgnm
Copy link

fgnm commented Oct 26, 2019

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

@supersu-man
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants