Youtube player support fragment no longer working on Android studio 3.2 (androidx)
Just use transaction.replace. Ignore the error, it’ll work. Google hasn’t refactored youtube api library to androidx yet.
Just use transaction.replace. Ignore the error, it’ll work. Google hasn’t refactored youtube api library to androidx yet.
As you can check in the doc: Class name of the Layout Manager to be used. The class must extend androidx.recyclerview.widget.RecyclerViewView$LayoutManager and have either a default constructor or constructor with the signature (android.content.Context, android.util.AttributeSet, int, int) If the name starts with a ‘.’, application package is prefixed. Else, if the name contains a ‘.’, the … Read more
I solved this by using: app:tint=”@color/COLOR_OF_ICON” and NOT: android:tint=”@color/COLOR_OF_ICON” Reference: https://github.com/material-components/material-components-android/blob/master/docs/components/FloatingActionButton.md
You have to use this TabLayoutMediator that mimics tabLayout.setupWithViewPager() and sets up the ViewPager2 with Tablayout. Otherwise, you will have to write your own adapter that will combine both parties. Its code will look like this in Kotlin TabLayoutMediator(tabLayout, viewPager) { tab, position -> tab.text = tabTitles[position] }.attach()
I solve my problem by changing all occurrences of androidx.constraintlayout.ConstraintLayout to androidx.constraintlayout.widget.ConstraintLayout
You can add below 2 lines into your gradle.properties file: android.useAndroidX=true android.enableJetifier=true Note to check, to not repeat any line that already exists (and ensure existing are true). Details: If you want to use androidx-namespaced libraries in a new project, you need to set the compile SDK to Android 9.0 (API level 28) or higher … Read more
As you are creating a new project, just follow @harsh ‘s answer and you’re done. However, as I recently upgraded my existing app to use new plugins, I had to migrate to AndroidX as well… and the default procedure in the official instructions didn’t work, which is using Android Studio to migrate the project – … Read more
They just changed API in Fragments. If you use this method to limit fragments lifecycle: You can now set a max Lifecycle state for a Fragment by calling setMaxLifecycle() on a FragmentTransaction. This replaces the now deprecated setUserVisibleHint(). Source: https://developer.android.com/jetpack/androidx/releases/fragment#1.1.0-alpha07 . If you need this method because you try to detect which fragment is currently … Read more
As A.L.Flanagan mentioned in a comment the problem is that android.support.v4.view.ViewCompat does not implement View.OnUnhandledKeyEventListener in the new androidx package structure and only implements it starting on API 28 in the support lib structure (at least in version 28.0.0). Therefore the warning appears on devices with API <28 and does not appear on those >=28. … Read more
Put these flags in your gradle.properties android.enableJetifier=true android.useAndroidX=true