-
-
Save codeforfun-jp/24f6b6e2af7cabbfc53adb2a9868f28e to your computer and use it in GitHub Desktop.
Kotlin Intro #7-3
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) | |
| enableEdgeToEdge() | |
| setContentView(R.layout.activity_main) | |
| ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets -> | |
| val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()) | |
| v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom) | |
| insets | |
| } | |
| val textView: TextView = findViewById(R.id.textView) | |
| textView.text = "こんにちは" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment