I am trying to disable the logo in my metro app live tile so that the last line of text in my tile notification will show. The Windows 8 documentation
says that there is a way to disable this logo in the Package.appxmanifest file. However, it does not specify how. I have set the ShortName in my .appxmanifest and I have also set the "Show name" field to "All Logos"; however, the default logo still appears in the bottom left-hand corner of the live tile and obscures the last line of text in my tile notification. Any ideas?
A live tile can have an image, text, or no branding. The default is the app logo, and you override this when you create a live tile update by specifying branding "none", like this:
var templateContent = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideImage);
var imageElement = (XmlElement) templateContent.GetElementsByTagName("image").Item(0);
imageElement.SetAttribute("src", string.Concat(imagePath, "wide_tile.png"));
var bindingElement = (XmlElement) templateContent.GetElementsByTagName("binding").Item(0);
bindingElement.SetAttribute("branding", "none");
var tile = new TileNotification(templateContent);
TileUpdateManager.CreateTileUpdaterForApplication().Update(tile);
You can't have both the last line of text and a short name. It's either logo/shortname or the the last line of text.
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/d7ed6580-0528-4a28-a475-731b37f2c89b
Related
I am trying to show an Image and text on windows phone. The text works but the image does not show up at all the docs on msdn says that it should though
here is my code ...
ToastTemplateType toastTemplate = ToastTemplateType.ToastImageAndText02;
XmlDocument toastXml = ToastNotificationManager.GetTemplateContent(toastTemplate);
XmlNodeList toastTextElements = toastXml.GetElementsByTagName("text");
toastTextElements[0].AppendChild(toastXml.CreateTextNode("Hello World!"));
XmlNodeList toastImageAttributes = toastXml.GetElementsByTagName("image");
((XmlElement)toastImageAttributes[0]).SetAttribute("src", "ms-appx:///assets/Square71x71Logo.scale-240.png");
((XmlElement)toastImageAttributes[0]).SetAttribute("alt", "red graphic");
ToastNotification toast = new ToastNotification(toastXml);
ToastNotificationManager.CreateToastNotifier().Show(toast);
Results
Expected Results
Image Square71x71Logo.scale-240.png
You cannot include an image in a toast on Windows Phone 8.1. The template will always be the app's logo then two text fields.
This is documented near the top of the Toast Template Catalog documentation on MSDN.
we have created a tile shortcut, which is similar to pinning the IE shortcuts on the screen. We have done this through code. We want an image should come on this tile. How do we add image to such a shortcut tile. we are running an exe first on windows 7 desktop mode and then making the pin to screen event click using the shell scripting. the tile is similar to any internet address pinned on the desktop
See this sample app...
The basic code you will need to achieve this is as follows...
Uri logo = new Uri("ms-appx:///Assets/squareTile-sdk.png");
Uri smallLogo = new Uri("ms-appx:///Assets/smallTile-sdk.png");
string tileActivationArguments = MainPage.logoSecondaryTileId + " WasPinnedAt=" + DateTime.Now.ToLocalTime().ToString();
SecondaryTile secondaryTile = new SecondaryTile(MainPage.logoSecondaryTileId,
"Title text shown on the tile",
"Name of the tile the user sees when searching for the tile",
tileActivationArguments,
TileOptions.ShowNameOnLogo,
logo);
secondaryTile.ForegroundText = ForegroundText.Dark;
secondaryTile.SmallLogo = smallLogo;
bool isPinned = await await secondaryTile.RequestCreateAsync();
Im new to titanium and i'm trying to create an a indeterminate preloader (or activity indicator as it is called in titanum). The problem is that on android, the activty indicator is automatically placed in a dialog box, preventing users from interacting with the app until the dialog is dismissed.
Is there any way to just add a simple indetermindate preloader without using a dialog box in android?
Thanks.
According to Appcelerator Docs
Activity indicators must be used differently on Android and iOS:
On Android, the activity indicator is a modal dialog that blocks the UI. Calling show displays the indicator, and calling hide removes it.
One option that you can use is setting cancelable property to true which let the user to cancel the activity indicator dialog by pressing the BACK button.
Appcelerator docs says :
An activity indicator can be used to show the progress of an operation
in the UI to let the user know that some action is taking place. An
activity indicator consists of a spinning animation and an optional
text message, and is used to indicate an ongoing activity of
indeterminate length. To show progress, use Titanium.UI.ProgressBar
instead.
Titanium.App.addEventListener('show_indicator', function(e) {
showIndicator(e.title_msg, e.sub_msg);
});
function showIndicator(title_msg, sub_msg) {
var actIndG = Titanium.UI.createActivityIndicator({
style : Titanium.UI.iPhone.ActivityIndicatorStyle.BIG,
top :10
left : 130,
height : 60,
width : 60,
height : screenheigth,
width : screenwidth
});
indView.add(actIndG);
indWin.open();
}
Up vote or Mark best if it helps you.
I am trying to change icons of my tab group's tab, but it doesn't show the image.
For iOS
I've used below code:
var win1 = Titanium.UI.createWindow
({
url:'Tab1.js'
});
var tab1 = Titanium.UI.createTab
({
icon:'footer_contactus_hover.png',
window:win1
});
// create controls tab and root window
var win2 = Titanium.UI.createWindow
({
url:'Tab2.js'
});
var tab2 = Titanium.UI.createTab
({
icon:'footer_search.png',
window:win2
});
I am having 4 tabs. Image's size is 81x51 . It shows me only blue rectangle instead of original image.
Also I've tried <property name="ti.android.fastdev" type="bool">false</property>
Whats wrong with the code ?
Assuming that your image does exist at the locations specified my first guess would be that your images are not created properly so that when the get masked all you see is a blue rectangle. I would suggest grabbing some other icon images from http://glyphish.com/ to see if it may be that your images are not created properly (I do not have any affiliation with that except I have used their icons in my projects and they are top-notch).
Also you may want to check out the Human Interface Guidelines as it sets forth specified sizes.
Solved by making images Transparent.
Also found : - Icon needs to be fileld with a color for visible pixels and transparent for the invisible part. The os will apply the blue glowing stuff, so if icon does not have transparent pixels you will only see a rectangle.
When I create a new window in Appcelerator I need to change the background image. This is done by setting “barImage”. The window itself is a child of a navigation group and has its own children. When I use the “barImage” parameter it hides the nav bar title text on the initial load of the window. If I navigate to its child window and then back the title text is displayed in the nav bar.
var sectionWindow = Titanium.UI.createWindow({
backgroundColor:'#fff',
fullscreen:false,
title:’My Sub Page',
modal:true,
barImage:'images/nav_bar.png'
});
How can I get the title text to consistently display?
I believe there are known issues with the barImage in the 1.7.2 release, please check the 1.8x CI builds where the issue has been addressed