Black background color in app icon - codenameone

I've a app icon image in png(transparent) of size 512 * 512. It works well ie. transparent bg in android but in iOS the app has black background. How can I make it transparent in iOS?
Black bg in app icon...

This happens when the size of the icon is incorrect. Apple has very specific requirements about the shape of the icon as you can see from all the icons around: they all look the same.
The best approach for iOS is to create a completely square image which will be cut automatically to the right size.
Assuming you want this icon for Android and a different icon for iOS you can use this tip: https://www.codenameone.com/blog/different-icons.html
In the build.xml find
<target name="build-for-android-device" ... >
Change the line:
icon="androidIcon.png"
Then copy your existing icon to androidIcon.png and replace icon.png with a square icon.

Related

Title bar color

How come that on one computer the WPF tile bar is blue and on another one white?
On another PC it is white, it has to do with computer version?
I don't do anything special in code.
There is a setting in Windows 10 under Settings > Personalization > Colors called Title bars and window borders. In the second image it must be off. By the way it's turned off by default.

Launch Screen Image is not updating for Dark Mode in iOS 13

I have a story board file as the launch screen. I have set image in button background Image. In that image, I have an image set for light and dark mode. but when I switch to dark mode, it always shows light mode image.
I'm not sure if you still need an answer to this, but I recently had the same issue.
For me, what fixed this was to uncheck the box 'Preserve Vector Data' within the image set properties. This means resizing won't work on the vector image, but you will see the image change with light/dark mode toggled within the storyboard.
Alternatively if I go back and check 'Preserve Vector Data' (back to the original state) the Dark image will display when the app is running if the simulator phone is in Dark mode.
Make sure you have enabled Appearance to Any, Dark. And check that you have added images for dark mode appearance.

Image displaced or absent with ImageViewer

Using the designer. My form has a layout BoxLayoutY. I just drop the ImageViewer in it. I have a pic added through "Add Picture", which is 1080 x 1400. I add it to the ImageViewer.
The "Simulate Device" command gives, in iPhone3:
And in Nexus (the pic below is static: can't be scrolled up or down):
Help?
I have installed the app locally on my Android and I get the same half cut pic as in the screenshot of the Nexus simulator.
The overal goal is to have a single form, scrollable vertically, showing pics (adjusted at the width of the screen) and text.
EDIT:
Could be a problem with the resolution of the pic. I decrease the res to 350 x 467 and it displays fine. So it will pixelize or won't scale to fit the width of the screen on larger devices?
The image viewer doesn't have a preferred size since it doesn't have an image in it. Its designed for usage full screen or within a predetermined layout. If you place it in the center of a border layout it will take up available space and work as expected.
Since it scales the image and allows manipulation of that images size, its size is flexible. If you want a component that takes up the exact image size you should use a Label.
Ok got it!
What I was doing wrong was that I had:
MainForm (in a BoxY layout)
-> a container nested in it (in Borderlayout)
---> an ImageViewer nested at the center of it.
This produced the effect above (half cut pic).
Instead, what achieved a properly sized pic was:
MainForm (in a BorderLayout).
-> The ImageViewer nested at the center of it. That's it, no container.

how to Paint non-client area in winForms transparent? .Net 4

im developing a custom form and i want that the non-client area be transparent. im handling the non client area painting via message number "0x85" and this is what i have tried so far:
Paint using the color "Color.Transparent" -> the non-client area was painted black. If I had used an image of red or black or green, it works perfectly, but transparent = black
Created a transparent image of the size of the form and used the method "myGraphics.DrawImage("img.png")". the background remained black. If I had used an image of red or black or green, it works perfectly also...
Not paint anything (hoping that i just would stay transparent)... not worked
Getting parts of a window transparent requires hardware support, a video adapter feature called layering. Use the form's TransparencyKey property. Set it to an unusual color, like Color.Fuchsia. And draw with that color to get the video adapter to omit the pixels.

WP7 How to change the ellipses color in the application bar?

I have an app bar with custom colors to match the page color of our application. I have managed to get the images and app bar itself to the colors I want, but not the ellipses at the top right. I have set the background color to white and the foreground color to blue. In expression blend, it looks like the ellipses are set to blue, but when I run the app, they are white (same color as the app bar background) and basically invisible. Is there a way to change the color of the ellipses?
Not sure why it does not work for you but following code in sample application worked for me:
<shell:ApplicationBar IsVisible="True"
IsMenuEnabled="True"
ForegroundColor="Orange">
I created a new PivotApplication project for Windows Phone. In a new page, I added ForegroundColor property to application bar and it worked.

Resources