-
-
Save codeforfun-jp/682a12ad6441aec57c6eb967f0de522b to your computer and use it in GitHub Desktop.
Java Intro #6-3
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
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
EdgeToEdge.enable(this); | |
setContentView(R.layout.activity_main); | |
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { | |
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); | |
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); | |
return insets; | |
}); | |
TextView textView = findViewById(R.id.textView); | |
textView.setText("こんにちは"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment