Placing an icon in the title of an activity in ICS

melamoud

Active Member
Licensed User
Longtime User
I have 3 apps, in two I can see the icon in the title and in the third I can not,
I cant figureout whats the differece between them

BTW I can se the icons only on ICS phones

any idea ? - THANKS

manifest that is not shoing the icon: (BTW I removed the line 'android:theme="@android:style/Theme.Translucent">' just to be sure it is not what causeing it, and its not.


Code:
B4X:
<?xml version="1.0" encoding="utf-8"?><manifest    xmlns:android="http://schemas.android.com/apk/res/android"    package="appsright.quickvolumemanager"    android:versionCode="1"    android:versionName=""    android:installLocation="internalOnly">        <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>    <supports-screens android:largeScreens="true"         android:normalScreens="true"         android:smallScreens="true"         android:anyDensity="true"/>    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>    <uses-permission android:name="android.permission.VIBRATE"/>    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>    <application        android:icon="@drawable/icon"        android:label="QuickVolumeManager"        android:theme="@android:style/Theme.Translucent">        <activity            android:windowSoftInputMode="stateHidden"            android:launchMode="singleTop"            android:name=".main"            android:label="QuickVolumeManager"            android:screenOrientation="unspecified">            <intent-filter>               <action android:name="android.intent.action.MAIN" />               <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>                    </activity>        <service android:name=".qvmservice">        </service>        <receiver android:name=".qvmservice$qvmservice_BR">            <intent-filter>            <action android:name="android.intent.action.BOOT_COMPLETED"/>            </intent-filter>            <intent-filter>                <action android:name="android.intent.action.MEDIA_BUTTON" />                </intent-filter>            <intent-filter>                <action android:name="android.media.VOLUME_CHANGED_ACTION" />                </intent-filter>        </receiver>    </application></manifest>
one that show icon:

Code:
B4X:
<?xml version="1.0" encoding="utf-8"?><manifest    xmlns:android="http://schemas.android.com/apk/res/android"    package="appsright.missedcallsnotifier"    android:versionCode="1"    android:versionName=""    android:installLocation="internalOnly">        <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>    <supports-screens android:largeScreens="true"         android:normalScreens="true"         android:smallScreens="true"         android:anyDensity="true"/>    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>    <uses-permission android:name="android.permission.READ_CONTACTS"/>    <uses-permission android:name="android.permission.VIBRATE"/>    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>    <uses-permission android:name="android.permission.INTERNET"/>    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>    <application        android:icon="@drawable/icon"        android:label="MissedCallsNotifier">        <activity            android:windowSoftInputMode="stateHidden"            android:launchMode="singleTop"            android:name=".main"            android:label="MissedCallsNotifier"            android:screenOrientation="unspecified">            <intent-filter>               <action android:name="android.intent.action.MAIN" />               <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>                    </activity>        <service android:name=".monitormissedcalls">        </service>        <receiver android:name=".monitormissedcalls$monitormissedcalls_BR">            <intent-filter>            <action android:name="android.intent.action.BOOT_COMPLETED"/>            </intent-filter>            <intent-filter>                <action android:name="android.intent.action.PHONE_STATE" />                </intent-filter>            <intent-filter>                <action android:name="ACTION_PHONE_STATE_CHANGED" />                </intent-filter>        </receiver>    </application></manifest>
 

melamoud

Active Member
Licensed User
Longtime User
sure

not working:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.


'SetApplicationAttribute(android:theme="@style/Theme.Transparent")
SetApplicationAttribute(android:theme,"@android:style/Theme.Translucent")

AddReceiverText(QVMService, <intent-filter>
    <action android:name="android.intent.action.MEDIA_BUTTON" />
    </intent-filter>)
   
AddReceiverText(QVMService, <intent-filter>
    <action android:name="android.media.VOLUME_CHANGED_ACTION" />
    </intent-filter>)


working:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

AddReceiverText(MonitorMissedCalls, <intent-filter>
    <action android:name="android.intent.action.PHONE_STATE" />
    </intent-filter>)

AddReceiverText(MonitorMissedCalls, <intent-filter>
    <action android:name="ACTION_PHONE_STATE_CHANGED" />
    </intent-filter>)



AddPermission("android.permission.READ_PHONE_STATE")
 
Upvote 0

melamoud

Active Member
Licensed User
Longtime User
I tried to remove that line making it exactly like the other app
Still no icon.

I'm just looking for explanation right now any idea ?
 
Upvote 0
Top