1

When i use the Label attribute in the manifest for an activity, it does not show in the recent application list. Code for activity in manifest file is:

<activity
        android:name=".MainActivity"
        android:screenOrientation="portrait" 
        android:theme="@style/MyTheme"
        android:icon="@drawable/ic_launcher"
        android:label=""
        >
        <intent-filter android:label="@string/app_name">
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

when i use android:label="@string/app_name" , then it start showing in the recent tab, but i dont want activity label.

Sandhu
  • 141
  • 2
  • 10
  • Can you elaborate your question? what is the recent application list? – Fahim Mar 06 '15 at 10:27
  • those applications which were recently opened or closed and a list is maintained in android for those applications – Sandhu Mar 06 '15 at 10:28

1 Answers1

0

Your application is not visible in recent apps list because label of your main activity is empty.

Change

<activity...  android:label="">

To

<activity... android:label="@string/some_name">

Edit:

If you don't want to show label for your activity then do the following.

You must set android:label="@string/some_name" in <activity> tag

And then write getActionBar().setDisplayShowTitleEnabled(false); in onCreate() method of your activity you want to hide label of.

This will let you hide the activity label and will show your app in recent apps list as well.

Apurva
  • 7,871
  • 7
  • 40
  • 59