Last active
October 4, 2020 10:54
-
-
Save catalinghita8/4eaa7924ba07d8f7a2a0d0db0ea114b6 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
| class MainActivity : AppCompatActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| val mockUserProfile = UserProfile.getMockProfileUser() | |
| setContent { MainActivityComposable(mockUserProfile) } | |
| } | |
| } | |
| @Composable | |
| fun MainActivityComposable(userProfile: UserProfile) { | |
| Surface( ... ) | |
| { ProfileCardComposable(userProfile) } | |
| } | |
| ... | |
| @Preview | |
| @Composable | |
| fun UserProfileCardPreview() { | |
| val mockUserProfile = UserProfile.getMockProfileUser() | |
| MainActivityComposable(mockUserProfile) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment