How to change android app icon background color in xamarin - xamarin.android

Variations of this question have been asked over the years but I have not found anything current, up-to-date, and step-by-step. The closest thing I have found is this but it is hard to follow and not completely accurate.
https://learn.microsoft.com/en-us/answers/questions/696540/background-color-for-launcher-icons.html
For instance, it refers to Visual Studio 2017 documentation on how to change the app icon that just does not work even in the Visual Studio 2022. Really, after so many years we have no easy way of setting the app icon?
https://learn.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/?tabs=windows#specify-the-application-icon
I my case I was really just trying to change the background color, which was showing up correctly under iOS but under Android was just white. So what is the best way of accomplishing this?

So the current site for creating all your iOS and Android icons is here:
https://icon.kitchen/
You upload your image with a transparent background and then select your background color. It gives you a preview of what your icon will look like and you tap Download to get a zip file containing all the icons you need with the proper folder structure.
In the case of Android you copy the mipmap* folders into your res or Resource folder in the Droid project folder.
There is one adjustment that you will have to make to the two files in the mipmap-anydpi-v26 folder. They come named "ic_launcher" but for some buggy reason they need to be named "icon".
After changing their name we encounter the next critical step due to the bug in the "Droid project Properties/Android Manifest/Application icon". You should be able to set your icon here but it does not work! Instead you must modify AndroidManifest.xml by hand to add the android:icon as follows:
<application android:label="γDog" android:theme="#style/MyTheme" android:icon="#mipmap/icon">
If you ever change the properties again you will need to make this change again because it will revert back and cause an error in your compilation.
One caveat is that on some Android platforms the background color is evidently not used and is instead left transparent.

Related

Material icons library is not detected on Xcode

I am trying to use Material Icons library on my swift application on Xcode but I cannot make that the library will be detected by the project.
The steps that I have followed:
From here I have copied the link to use git repository.
On terminal, I have go through the project folder and use the link that I have copied before.
Xcode project does not detect it so I drag it from the folder to the project but I cannot use it.
Am I doing something in the wrong way?
Thanks in advance!
As #EricAya pointed I was following the wrong steps. I saw that there were steps to use Material icons for iOS but as it says in the documentation:
Material icons also work well within iOS apps. In both the material icons library and git repository, these icons are packaged up in Xcode imagesets which will work easily with Xcode Asset Catalogs (xcassets).
I guessed that it could also be installed with git repository but I could not get it. Finally I used the following steps:
Go to the official webpage of Material icons and click on the icon that you would like to use.
You will see on the right corner of the webpage two options to download the icon (SVG or PNG). I have chosen PNG.
Unzip the .zip package.
Open ios folder and drag the .imageset folder to your .xcassets file in your project of Xcode.
You can create both an imageView or button to set it and use the following code to create the image:
UIImage(named:"ic_close")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate)
To set it to your UIImageView you can use yourImage.image and for your button yourButton.setImage().
Do not forget to change the tint property of your imageView or button. I spent some hours thinking that it was not working and the problem was that the tint property was white (sometimes simpler things make waste your time easily).

Its just impossible to add an action extension icon

I've been literally trying for two weeks to get an icon for an action extension to appear, but absolutely nothing works.
I've seen past questions such as this iOS 8 Action Extension icon sizes and this Why isn't my iOS8 Application Action Extension App Icon showing up? but they are of no use.
I've created an Xcode template project purely to try every combination of things mentioned in the other questions, still without avail.
1) The first thing that's mentioned is that the action extension should have its own asset catalog, ok here it is:
2) Secondly that it should contain an app icon image set, here that is:
3) Thirdly people say they had to add its target membership to the extension and to the app. Here that is too (in all of these things, I've tried variations such the membership being just the extension, just the app, both)
4) Fourthly, people mention they had to add it to the compile sources, here that is, as well as it being copied in the bundle resources:
5) Some say it also needs to be copied in the container app's bundle, here that is, and for good measure its been added as a compile resource of that too:
6) One person says it was necessary to add the container apps assets to the extension bundle, I can't see how that would work as the icons in the container app are colored and not matching the requirements of the extension icons, but what the hell, might as well try everything right, and while we're at it lets add assets everywhere:
7) The asset icon itself is important, colored icons are not displayed, but I tried it anyway. A simple black and white image is described as the white parts appearing as grey but I've tried that anyway. Trying unsupported icons was just desperation and experimentation, of course I'm actually using an icon with a transparent background. When posted here it appears on this webpage as all white of course, but the non-black parts are actually fully transparent and have an alpha of 0:
But despite trying many combinations of all the various steps above, this is what it looks like on the device:
This is using iOS 10.n, latest 10.7 (it hasn't worked with any beta) and Xcode 8.6. If I download an app from the app store that uses action extensions then their icons are appearing, so there's no issue with the 10 beta. The issue is either something building the app with Xcode beta, or some step I've missed out - if that is the case, then what?
Finally found out the solution - in order to get it to work its additionally necessary to set the Asset Catalog compiler options of Build Settings section of the extension to specify the name of the app icon set within the asset catalog:
How to set an action icon really is the most appallingly badly documented aspect of iOS, totally shockingly awful.

Ios default icon for open view from list

In every ios app you can have a list that contains elements with subelements.
Tapping on the element will open a new page and you can usually press back to return.
This is indicated with a grey ">" symbol on the right.
Is this symbol downloadable somewhere? I know i can just type a > but it doesn't look exactly like the default icon used by ios.
I'm using Xamarin dialog and a standard RootElement embedded as a list item looks exactly like the default ios but i need to customize it with an icon placed left of the text(which is no problem except that i now lose the default > icon).
Googling for ios system icons, ios default icons and ios sdk did not yield the wanted result. I'm hoping that these icons are somewhere embedded on the device.
I hope you guys can help me out, thanks !
As far as I know there is no way to access a UIImage instance of the chevron during run time. Most likely there is private API for this, but I am not aware of it, and since it's private you are not allowed to use it anyway.
You could probably instantiate a cell that has the disclosure indicator as accessoryType and walk the view hierarchy to find it. But that will break easily, so don't do it.
The best way is to add an image and update it with every new iOS release.
There's the iOS Artwork Extractor which basically gets you every piece of artwork that is used in iOS.
The artwork you are looking for should be named UITableNext. (at least that's the name in iOS6, I don't have an extracted archive of iOS7 yet)
Strictly speaking you are violating Apples rules and their copyright if you use their artwork without Apples written consent.
As far as I know this has never been enforced, and lots of people do it, but it's good to keep it in mind.

Make the App icon UnFocusable in BlackBerry?

I have install an application in my device on which I am working. When I open the downloads folder in my device, my app Icon seems focused.
Now my question is, is it possible to make it un-focusable. As shown in image. please let me know if anyone have some suggestions for this task.
You can remove the blue background on the icon by specifying a rollover icon which has a non-transparent background in your BlackBerry Application Descriptor here:
Note that you will not be able to remove the text highlighting underneath the icon because that behaviour is controlled by the OS, which incidentally is a good thing because otherwise your users wouldn't know when your app is focussed.

Is there a way to have a different Default.png (splash image) for different languages/locales in iOS? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Localization of Default.png is not working
My splash screen has English text in it, so I would like to be able to have a different splash image when users have a different language set.
Is this possible?
Yes, it's possible. Pretty much the same way you localize all your resources.
You just need to provide a Default.png image and then enable all the languages you're interested in. The result is that you'll get a copy of the image for each language into the respective folders. Then edit (or overwrite) each image as you need. I have tested it right now and it works fine (on iOS 5 but I believe is the same for older versions). Here is a screenshot for easy reference:
EDIT:
Regarding any doubts about whether or not this is a good practice, this is straight from Apple's documentation:
In addition to including the launch images at the top level of your
bundle, you can also include localized versions of your launch images
in your app’s language-specific project subdirectories. For more
information on localizing resources in your app, see Table 6-2.
No.
Edit: Indeed, I'm dumbfounded. Like nevan-king I'm going to leave my answer nevertheless, since I still think that's the way it is intended to be done by the iOS guidelines (and my personal opinion about localizing whole images in order to localize its text...).
A splash screen is not intended to provide information. Splash screens are only shown for like a second or so, so it would be unfeasible to show text anyway.
Common practice for what you want to do is to use your image without text as splashscreen, and after that show a custom view with your image and localized text for a few seconds.
That way it will seem like you had a localized splash screen (and the text appears shortly after the image, which is fine).
However, keep in mind that the idea of iOS apps is fast responsiveness, so only show a "startup screen" if you must (for marketing reasons or whatever).
Read this for further information: http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW5
There's no way to do this. Instead, make a Default.png with no text.
Edit: I stand corrected. Just tried Alladinian's method and it worked. I'll leave my answer, as it's a useful technique to know.
You can do this pretty easily in Photoshop by selecting a square, then copying it and pasting it over the text. Use Marquee to select a square of your graphic (say an empty part of a navigation bar). Then hit "v" for the move tool. Use cmd-opt and move the square a little to the left, then cmd-opt-shift so that it doesn't move up or down. Move the square over the text and let go of the mouse button. Repeat as necessary.
If you want to see how Apple handles multi-language splash screens, open Maps or Mail. They have a Default screen with no text, then the text appears (in whatever language) when the app has loaded.

Resources