I understand the background is actually an image (WideLogo.png/SmallLogo.png) and specified in the app manifest file. But is it possible to swap these with a new set of images programatically? Based on the information displayed on the tile, I want to change the background color of the tile.
You cannot edit the app manifest to change the default color. However, you can render an image with the appropriate background color and content then set it as tile.
For more details on how to achieve that, read: Windows 8 Metro App - Render PNGs
I don't think you can change the background color of the tile programmatically. That's set in the manifest for the default tile, so that you can overlay a transparent background image for a predictable default look for your tile.
But you can send tile notifications from your app while running, and these can include images and text.
Here's a link to the MSDN docs on tiles and notifications:
http://msdn.microsoft.com/en-us/library/windows/apps/hh779724.aspx
and to the catalog of tile templates you can use:
http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
One way you could implement this is to programmatically create a tile image with the background color and text you want, and then send that as a tile notification.
Related
My objective is to create an Apple Watch complication that has multiple colors. Specifically, I want the multi-colored template image that I submit to stay multi-colored instead of defaulting to white. This is on a multi-colored watch face, I know the color will be overridden if the user selects a color tint for their watch face.
What code would I put into which files to keep my complication template multi-colored?
UIImage has a parameter to define how it is rendered on screen when placed inside of an UIImageView.
If you're loading this image in your code you'll need to set UIImage.RenderingMode to .alwaysOriginal in order to have the system display its colors when there's no tint override. However, if you're simply loading from an Xcode Asset Catalog, just select the asset and then change the rendering mode from the menu in the Inspector.
Select the Inspector, then select Original Image from the Render As dropdown.
See the developer documentation on rendering mode.
I have a welcome screen which displays an image using label as background.
Now, I want to and I'm trying to display an icon upon this background image with transition.
So, once the icon transition over the background image is done, I should be able to see the background image and the icon displayed in one screen.
Is it possible? How should I do it?
This is possible in Codename One using layered layout, I don't recall if we added it to LWUIT or later on as we forked to Codename One.
Failing that just set the image as the bgImage and then just place the other image on top.
Sometimes pdf might have a transparent background. And In my application I have given a option to choose background. So, in case of pdf with transparent background and background color black all things becomes black black so, any way to check or any key inside dictionary of pdf page that can help me? Any help will appreciated.
The easiest solution for you would be to remove black color from available background colors.
Generally, all pdf pages have transparent background and the white background color is set by the viewer application. It is possible to set a background color for each page. You can read all about it in Page Group under Transparency section of the PDF Reference.
It is also possible to show a background color for a page by setting 'BoxColorInfo' dictionary in the page dictionary with appropriate values.
But I am not sure what you can achieve by knowing what color a page background is, since black background is going to be a problem for PDFs with transparent pages anyways.
EDIT: Following is the paragraph from PDFReference i was trying to point you to:
Ordinarily, the page is imposed directly on an output medium, such as
paper or a display screen. The page group is treated as an isolated
group, whose results are then composited with a backdrop color
appropriate for the medium. The backdrop is nominally white, although
varying according to the actual properties of the medium. However,
some applications may choose to provide a different backdrop, such as
a checkerboard or grid to aid in visualizing the effects of
transparency in the artwork.
It says that most PDFs would have a transparent and it is your application which shows the background color. Hope this helps.
In my iPhone app, I want to allow the user to draw image by hand with different colors.
I want the color palette where user can select the color and draw with the selected color.
How can I show the color palette in iPhone?
You can create a view with several buttons on it. Buttons should have background color also give them different tags (according to color). Now when you press on the button get its tag and then you can get the color from an array (you need to first create an array with color codes or RGB). when you can color code or RGB you can draw with that color.
Post comment if you have confusion
You'll have to do this yourself as there is no system color picker. If you don't want to create one from scratch, you might want to look for some existing free project as a code base.
Take a look at this open source project, for a start. It's under the BSD license.
semi-transparent images that I added to my resources. When viewed in interface builder it doesn't show as transparent as it did when I had it in Photoshop. I made sure that the opacity was the way I wanted it and the background was transparent pixels. I even tried saving the image as PNG-24 preset and checked the transparency box in PS mobile and web. And in interface builder I made sure that the opaque box in view attributes was unchecked. But after all this the image doesn't display with the proper opacity as I set it as.
You need to save it as PNG-32, 24 Bits (3*8) is just RGB, so it doesn't have an alpha channel.