1. 첫번째 방법 : Activity 에 적용


requestWindowFeature(Window.FEATURE_NO_TITLE);



super.onCreate 앞에 선언함

아래와 같이.



protected void onCreate(Bundle savedInstanceState) {

requestWindowFeature(Window.FEATURE_NO_TITLE);


super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);


~~~~~~~




2. 두번째 방법 : 스타일 사용


styles.xml 에 아래 내용 추가


   <style name="Theme.AppCompat.Light.NoActionBar" parent="@style/Theme.AppCompat.Light">

        <item name="android:windowNoTitle">true</item>

        <item name="windowActionBar">false</item> <!-- For 2.x version  -->

   </style>



AndroidManifest.xml 에 android:theme 으로 적용


    <application

        android:allowBackup="true"

        android:icon="@drawable/ic_launcher"

        android:label="@string/app_name"

        android:theme="@style/Theme.AppCompat.Light.NoActionBar"

        >

~~~~~~

블로그 이미지

엘로드넷

,