Last active
March 23, 2020 22:17
-
-
Save fo2rist/cb3c2a1ec70bd76e9ebba1f8b2940ae0 to your computer and use it in GitHub Desktop.
Java To Kotlin Conversion. Step 4. Interop After
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NonLazyDemoAdapter internal constructor(fm: FragmentManager) : FragmentStatePagerAdapter(fm) { | |
internal class FragmentBundle( | |
@JvmField | |
@SerializedName("id") // if this field was used directly before we need JvmField annotation | |
var id: Int, | |
@JvmField | |
@SerializedName("name") // if this field was used directly before we need JvmField annotation | |
var name: String | |
) : Serializable | |
companion object { | |
@JvmStatic // if this method was used from Java before we need JvmSatic annotation | |
fun createAdapter(fm: FragmentManager): NonLazyDemoAdapter { | |
... | |
} | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment