android - Why does Activity display Title yet by default? -


from doucment , know actionbaractivity display app title default. create activity eclipse, have set android:theme android:theme.light, find activity still display title default, why?

enter image description here

package com.example.aa;  import android.app.activity; import android.os.bundle; import android.view.menu; import android.view.menuitem;  public class mainactivity extends activity {      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);     } }    <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.aa"     android:versioncode="1"     android:versionname="1.0" >      <uses-sdk         android:minsdkversion="10"         android:targetsdkversion="21" />      <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme" >         <activity             android:name=".mainactivity"             android:label="@string/app_name" >             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>     </application>  </manifest>   <resources>      <!--         base application theme, dependent on api level. theme replaced         appbasetheme res/values-vxx/styles.xml on newer devices.     -->     <style name="appbasetheme" parent="android:theme.light">         <!--             theme customizations available in newer api levels can go in             res/values-vxx/styles.xml, while customizations related             backward-compatibility can go here.         -->     </style>      <!-- application theme. -->     <style name="apptheme" parent="appbasetheme">         <!-- customizations not specific particular api-level can go here. -->     </style>  </resources>    <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context="${relativepackage}.${activityclass}" >      <textview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="@string/hello_world" />  </relativelayout> 

try setting activity declared in manifest:

android:theme="@android:style/theme.notitlebar"  

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -