Icon in Action Bar on Lollipop - android-actionbar

I have tried putting android:icon and android:logo under Application and the launcher activity in the Android Manifest. I have also tried programatically setting the logo and setting the icon. And finally I have also tried including icon="my_icon" and logo="my_logo" in the AppCompat styles.xml. None of this has worked and I am still left icon less. Any help please?

Google decided to disable the action bar icon beginning in Lollipop without documentating the change. There is another thread with more information.

Related

Taskbar icon appears blank (possibily due to a sticky cache)

I am having some issues with invalidating the Windows icon cache. I'm running a Win32 app that used to show the taskbar icon properly, however, after replacing the app's icon, the taskbar icon appears blank. It's interesting because when I use ALT-TAB, the correct icon does show up.
The window is created with WS_EX_APPWINDOW. I know it registers the correct icon because after pinning/unpinning it from the taskbar, the icon shows up as expected. I’ve gone through several attempts to solve this and have narrowed it down to refreshing the icon cache.
A few of the ways I tried to reset the icon cache:
Delete all icon cache files in folder:
%LOCALAPPDATA%/Microsoft/Windows/Explorer/, and restart explorer.exe
In Command Prompt: $ie4uinit.exe -show
Using Shell APIs to force the taskbar to refresh (SHChangeNotify)
Having gone through several different attempts and configuration techniques, the taskbar icon remains blank as shown above. I was wondering if there is another foolproof technique for resetting the Windows icon cache.

How to Set Desktop shortcut icon different and task bar icon different for a QT Windows application?

I need to set title.ico as my application icon and shortcut.ico as my desktop shortcut. Is there any way to do it in a Qt application itself while building?
Whenever the user right-clicks on my application and clicks on sendto->desktop(create shortcut), the shortcut should have shortcut.ico. But now it's always displaying title.ico.
I checked WinApi IShell_link but it didn't help.
I am also a beginner, but turns out this is possible. See this thread: https://forum.qt.io/topic/45324/taskbar-icon-different-from-the-icon-of-the-window/8
Hope I understood you right. Enjoy!
Edit 2018-03-13:
Create your icon in diffrent sizes (e.g. 16px, 32px, ...) as an .ico (while on Windows), for further information visit: http://doc.qt.io/qt-5/appicon.html
Call QWindow::setIcon() (http://doc.qt.io/qt-5/qwindow.html#setIcon)
Profit. The icon should now be visible in the greater resolution in the taskbar, while the smaller one is choosen for the app window.

Cannot display new icon for the application

I am trying to change the icon of the application, and I have changed it and the project builds completely fine.
But when the application starts, I still see the default icon on the taskbar. On the otherhand, when I click on About, I can see the new Icon.
What am I missing?
You need to make sure that the resource ID of your icon is the lowest of all the icons in your resources. Windows will display the icon with the lowest ID.

Remove System Tray Icons in Wm6.5

I want to to remove the volume system icon from the top bar of the command bar. I have been looking for a solution, but so far have found nothing. Does anyone know how I can do this?
you can not remove the icon for volume, nor any other from the wm65 taskbar. These icons are defined by the OEM in the OS image build. You can change the app that is called when a user taps the loudspeaker in the ribbon bar popup. See my article about kiosk mode part2. regards, josef (www.hjgode.de/wp

Changing program icon dynamically

In C++, is there anyway to let the user chose the icon of the app? For example, Winamp lets you select which icon you wish to use from a list of icons in it's preferences. How is it done?
There is the icon that you see in explorer. This is a resource in your executable. You could change that, but I wouldn't advise you too. Virus scanners can get nervous if executables are modified, and in Windows Vista you will not even be allowed to write in the Program Files folder.
But the icon that is displayed on the task bar or in the system tray can be changed. This is actually the icon of your application window and it can be set by sending a WM_SETICON message.
And there are shortcuts. They can be changed too, and in a shortcut you can specify which icon should be used.
I found a discussion on changing icons that has information about the first two options.
For Visual Studio 2010 in an MFC dialog based app
A. In the resource view, rightclick Icon folder and add icon. Give it an ID like IDI_MYICON. Leave it as is or draw something nice.
B. Go to OnInitDialog. Add the following two lines of code:
HICON hMyIcon = LoadIcon( AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MYICON) );
SetIcon( hMyIcon, FALSE ); // FALSE == use as small icon
You can read about these functions in the help to understand what is happening.
This sets the icon as icon for the sysmenu (topleft) and in the taskbar. This is however not automatically reflected in all situations. E.g. for a systray icon you need to explicitly specify the icon again in the call to Shell_NotifyIcon().