Created
May 10, 2020 16:32
-
-
Save sagar2093/06656bbd8e89423482fcfb8543fe88ef to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// normal function | |
fun showGreeting(name:String){ | |
// tv_greeting is defined in xml layout | |
tv_greeting.text = "Hello $name" | |
} | |
// composable function | |
@Composable | |
fun GreetingText(name:String){ | |
Text(text = "Hello $name") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment