Created
October 21, 2021 10:06
-
-
Save carotkut94/3cd552a2f33cf3ea1ddf1f3f6a2e77c2 to your computer and use it in GitHub Desktop.
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 DemoFragment: Fragment(){ | |
override fun onCreateView( | |
inflater: LayoutInflater, | |
container: ViewGroup?, | |
savedInstanceState: Bundle? | |
): View { | |
return ComposeView(requireActivity()).apply { | |
setContent { | |
SampleTheme { | |
Greeting(name = "Hello Android") | |
} | |
} | |
} | |
} | |
} | |
@Composable | |
fun Greeting(name: String) { | |
Text(text = "Hello $name!") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment