-
-
Save codeforfun-jp/e11cc413cf2c3b80552b1cc3157e1369 to your computer and use it in GitHub Desktop.
【Android Studio】アクションバーを非表示にする方法
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
package com.example.myapplication; | |
import androidx.appcompat.app.ActionBar; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
ActionBar actionBar = getSupportActionBar(); | |
if (actionBar != null) { | |
actionBar.hide(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment