PhoneGap Build Android Icons - phonegap-build

I'm struggling to get my PhoneGap Build android icons to show up properly. My iOS icons are working perfectly. Here's the Config.xml:
<icon src="icon/ldpi.png" gap:platform="android" gap:qualifier="ldpi" />
<icon src="icon/mdpi.png" gap:platform="android" gap:qualifier="mdpi" />
<icon src="icon/hdpi.png" gap:platform="android" gap:qualifier="hdpi" />
<icon src="icon/xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" />
<icon src="icon/xxhdpi.png" gap:platform="android" gap:qualifier="xxhdpi" />
<gap:splash src="splash.png" gap:platform="android" />
And here's the folder structure:

You need to have default icon and splash screens and you shouldn't set a platform for these.
See here: http://docs.build.phonegap.com/en_US/configuring_icons_and_splash.md.html#Icons%20and%20Splash%20Screens

Related

Xamarin Forms UWP change vertical scrollbar color

I have a Xamarin Forms app which I'd like to change the UWP vertical scrollbar color (currently it uses the default windows color).
How can I do it?
Maybe is possible to do it from UWP App.xaml or App.xaml.cs somehow?
Maybe is possible to do it from UWP App.xaml or App.xaml.cs somehow
Sure, you could edit the UWP native ScrollBar style to update the default ScrollBar interface. And the following code is updating the thumb's color. you could copy the following to your uwp app.xaml file directly
<Application.Resources>
<ResourceDictionary>
<SolidColorBrush x:Key="ScrollBarBackgroundBrush" Color="RoyalBlue" />
<SolidColorBrush x:Key="ScrollBarPanningThumbBackground" Color="RoyalBlue" />
<SolidColorBrush x:Key="ScrollBarThumbFillPressed" Color="RoyalBlue" />
<SolidColorBrush x:Key="ScrollBarThumbFillPointerOver" Color="RoyalBlue" />
<SolidColorBrush x:Key="ScrollBarThumbFill" Color="RoyalBlue" />
<!--The default scrollbar is too long to share here, please go to UWP generic.xaml to find the defalut `ScrollBar` style and edit base on that.-->
<Style TargetType="ScrollBar">
<Setter Property="MinWidth" Value="{ThemeResource ScrollBarSize}" />
<Setter Property="MinHeight" Value="{ThemeResource ScrollBarSize}" />
<Setter Property="Background" Value="{ThemeResource ScrollBarBackground}" />
<Setter Property="Foreground" Value="{ThemeResource ScrollBarForeground}" />
<Setter Property="BorderBrush" Value="{ThemeResource ScrollBarBorderBrush}" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
........
</ResourceDictionary>
</Application.Resources>
The accepted solution works.
I was a little stuck, so putting it out there (in hindsight it was obvious).
You need to edit the app.xaml in the UWP project, NOT the app.xaml in the shared code project.

Xamarin MAUI application not shows correct output

I have downloaded Visual Studio 2022 Professional (preview) version from
MS Document. Also I have followed the other steps to create first sample application using .Net MAUI template after VS installed.
It does create new project with all the required dependency. I have installed Android sdk api v30 and created a simulator as mentioned in the official document.
When I have run the application on Android Emulator it does take a lot time to run and after it loaded properly it shows wrong output. It's just showing two Hello World label, while MainPage.xaml does have button as well but that button is not displayed. I have attached output screenshot here:
MainPage.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.MainPage">
<ScrollView>
<VerticalStackLayout Spacing="25" Padding="30">
<Label
Text="Hello, World!"
SemanticProperties.HeadingLevel="Level1"
FontSize="32"
HorizontalOptions="Center" />
<Label
Text="Welcome to .NET Multi-platform App UI"
SemanticProperties.HeadingLevel="Level1"
SemanticProperties.Description="Welcome to dot net Multi platform App U I"
FontSize="18"
HorizontalOptions="Center" />
<Label
Text="Current count: 0"
FontSize="18"
FontAttributes="Bold"
x:Name="CounterLabel"
HorizontalOptions="Center" />
<Button
Text="Click me"
FontAttributes="Bold"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Center"
BackgroundColor="Orange" TextColor="White"/>
<Image
Source="dotnet_bot.png"
SemanticProperties.Description="Cute dot net bot waving hi to you!"
WidthRequest="250"
HeightRequest="310"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>
Does anyone know what is wrong here in the app? I have followed the steps mentioned in the MS Document which I have mentioned in the question.

Using icons instead of PNG in Xamarin Forms Tabs

How do I use icons e.g. Material Icons instead of PNG iamges in my tabs in a Xamarin Forms app with Shell?
The following is how I defined tabs for home screen in my Xamarin Forms app:
<FlyoutItem Title="Home">
<FlyoutItem.Icon>
<FontImageSource
FontFamily="MISHRP"
Glyph="{StaticResource HomeIcon}"
Color="White" />
</FlyoutItem.Icon>
<Tab Title="Dashboard" Icon="icon_dashboard.png">
<ShellContent Route="Dashboard" ContentTemplate="{DataTemplate views:Dashboard}" />
</Tab>
<Tab Title="My Feed" Icon="{StaticResource Feed}">
<ShellContent Route="MyFeed" ContentTemplate="{DataTemplate views:MyFeed}"/>
</Tab>
</FlyoutItem>
As you can see in above code, in the first tab item (Dashboard), I use a PNG image and that displays fine in my app.
In the second TAB item (My Feed), I tried using an icon I defined in my App.xaml page but that doesn't show at all.
How do I use icons in tabs in a Shell Xamarin Forms app?
I think you use something like this , from the MyCoffeeApp
https://github.com/jamesmontemagno/MyCoffeeApp/blob/master/MyCoffeeApp/MyCoffeeApp/AppShell.xaml
<Tab.Icon>
<FontImageSource FontFamily="FAS"
Color="{AppThemeBinding
Dark=White,
Light={StaticResource SystemGray5Dark}}"
Glyph="{StaticResource IconCoffee}"/>
</Tab.Icon>

Cordova - Is it possible to configure Windows App Icons and Splash Screens in config.xml?

Is it possible to configure the icons and splash screens in the config.xml file before creating the windows app's platform folder? If so, how?
I've looked through the documentation on the phonegap site, but don't see a way to do so.
Thanks!
In config.xml, to change icon properties:
If Windows Phone8,
<platform name="wp8">
<icon src="res/wp/ApplicationIcon.png" width="99" height="99" />
<!-- tile image -->
<icon src="res/wp/Background.png" width="159" height="159" />
</platform>
If Windows8,
<platform name="windows8">
<icon src="res/windows8/logo.png" width="150" height="150" />
<icon src="res/windows8/smalllogo.png" width="30" height="30" />
<icon src="res/windows8/storelogo.png" width="50" height="50" />
</platform>
Windows Phone specifies a single splash screen image:
windows-phone/screen-portrait.jpg
Please refer this documentation.

Ogg (theora / vorbis) playback in Firefox 3.6

I have this html5 code, with a MP4 for Chrome (working), an OGG for Firefox (failing) and the same ogg via a java applet for Internet Explorer (working):
<video width="848" height="480" controls="controls" autoplay="true" >
<source src="vernissage_cpal_2009.mp4" type="video/mp4" />
<source src="vernissage_cpal_2009.ogv" type="video/ogg" />
<applet code="com.fluendo.player.Cortado.class" archive="http://theora.org/cortado.jar" width="848" height="480">
<param name="url" value="vernissage_cpal_2009.ogv" />
</applet>
</video>
Firefox display a gray box with a X inside it. The file "vernissage_cpal_2009.ogv" also plays well inside normal media player, like VLC.
I had a similar issue, trying to embed ogg audio, where it was playing in FF, but not in chromium.
I found I was missing a tag, type audio/ogg. It now plays.
Here is the code:
<object width="300" height="42">
<param name="src" value="tonystheme.ogg">
<param name="type" value="audio/ogg">
<param name="autoplay" value="true">
<param name="controller" value="true">
<param name="bgcolor" value="#000000">
<embed src="tonystheme.ogg" autostart="true" loop="false" width="300" height="42"
controller="true" bgcolor="#000000"></embed>
</object>
Granted, this is not working with the new html5 code, but, it did make it so the file would play.
Use "video/ogg; codecs=theora,vorbis" as your mime type and Firefox will play it back happily.

Resources