It shows the images but doesn't play the animation.
That's my XML code.
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:QRCodeScanner"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
x:Class="QRCodeScanner.MainPage"
android:TabbedPage.ToolbarPlacement="Bottom"
BarBackgroundColor="Black"
SelectedTabColor="Beige"
UnselectedTabColor="DimGray">
<ContentPage IconImageSource="generator.gif"/>
<ContentPage IconImageSource="scanner.gif"/>
</TabbedPage>
Related
Please tell me how to change size of icon in Toolbar.Because when I put another icons with the same resolution they are too small
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Icon="{Binding CurrentIcon}"
x:Class="App1.BicyclePageMain"
xmlns:control="clr-namespace:App1"
BackgroundColor="{AppThemeBinding Light=White, Dark=White}">
</ContentPage>
I have a problem. I am using the Nuget package: Rg.Plugins.Popup.Pages with this colorPicker: Spillman.Xamarin.Forms.ColorPicker.
I created this page:
<?xml version="1.0" encoding="utf-8" ?>
<pages:PopupPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
xmlns:animations="clr-namespace:Rg.Plugins.Popup.Animations;assembly=Rg.Plugins.Popup"
x:Class="Memento.Dialogs.ColorPicker"
xmlns:colorPicker="clr-namespace:Spillman.Xamarin.Forms.ColorPicker;assembly=Spillman.Xamarin.Forms.ColorPicker">
<pages:PopupPage.Animation>
<animations:ScaleAnimation
PositionIn="Center"
PositionOut="Center"
ScaleIn="1.2"
ScaleOut="0.8"
DurationIn="400"
DurationOut="300"
EasingIn="SinOut"
EasingOut="SinIn"
HasBackgroundAnimation="True"/>
</pages:PopupPage.Animation>
<pages:PopupPage.BindingContext>
<colorPicker:ColorPickerViewModel />
</pages:PopupPage.BindingContext>
<ContentView HorizontalOptions="Center" VerticalOptions="Center"
Padding="8" BackgroundColor="White">
<colorPicker:ColorPickerView />
</ContentView>
</pages:PopupPage>
But when I try to define the page like this: ColorPicker_Popup = new ColorPicker(); I get the following error:
Android.Content.Res.Resources+NotFoundException: 'Resource ID #0x7f0700c3'
What am I doing wrong?
Can't you do it like this?
await PopupNavigation.PushAsync(new ColorPicker(), true);
I'm using a TabbedPage type in my Xamarin app. I've got the icons and content working perfectly.
The Problem: I can't see to find any way to setting the width of a tab. I want it to be such that the tab widths stretch to match the screen on which they are being rendered
I've tried using a TabbedPageRenderer for Android but none of the properties on their seem to be non-zero so I cannot perform the calculation manually
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:IGNORETHIS="clr-namespace:IGNORETHIS;assembly=IGNORETHIS"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
x:Class="IGNORETHIS" <!-- INTENTIONAL -->
android:TabbedPage.ToolbarPlacement="Bottom">
<!-- Account Page -->
<ContentPage Title="Account"
Icon="AccountTabIcon.png">
<StackLayout>
<!-- Blabla some stuff -->
</StackLayout>
</ContentPage>
<!-- Settings Page -->
<ContentPage Title="Settings"
Icon="SettingsTabIcon.png"/>
</TabbedPage>
What I would like is a set of tabs that take up the entire width of the screen. This should be default behavior!
I created an hamburguer menu with master detail page. In the detail page i would like to have a botton navigation bar with shortcuts (like twitter app for android) but icons of eash shortcuts are not being displayed.
I tried using url, file path and ImageSource but none of these displayed the image icon.
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="KiaiDay.Views.Main.HomePage"
xmlns:pages="clr-namespace:KiaiDay.Views.Main"
xmlns:local="clr-namespace:KiaiDay.MarkupExtensions" NavigationPage.HasNavigationBar="False">
<MasterDetailPage.Master>
...
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<NavigationPage>
<x:Arguments>
<pages:HomePageDetail />
</x:Arguments>
</NavigationPage>
</MasterDetailPage.Detail>
</MasterDetailPage>
Homepagedetail
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="KiaiDay.Views.Main.HomePageDetail"
Title="Pagina Inicial"
xmlns:local="clr-namespace:KiaiDay.MarkupExtensions"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
xmlns:view ="clr-namespace:KiaiDay.Views.PosLogin"
BarBackgroundColor="LightGray" BarTextColor="White"
android:TabbedPage.ToolbarPlacement="Bottom">
<ContentPage Title="Home" Icon="{local:ImageResource KiaiDay.Images.calendarWhite.png}" NavigationPage.TitleIcon="calendarWhite.png"/>
<ContentPage Icon="calendarWhite.png"/>
<ContentPage Icon="https://img.icons8.com/ios/50/000000/calendar-11.png" />
</TabbedPage>
I tried Url of the image, using file path located at android project (Resources/drawable) and ImageSource. None of these were able to display the icon.
So, i solved the problem. It was needed to have the image files in each platform. Android on Resources/drawable and iOS Resources. After that change build action of each image , for Android set AndroidResource and iOS bundleResource.
I have a simple question, How I add in the carouselPage an external page from a diffent folder?
<?xml version="1.0" encoding="utf-8" ?>
<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TutoSuite;assembly=TutoSuite"
x:Class="TutoSuite.navigation.CrouselPage">
<local:MainPage/>
</CarouselPage>
This code works perfectly but when I'm trying to access to an other page who are in a folder and not directly in the root like this. (Client here is a folder where I have all my client's pages)
<?xml version="1.0" encoding="utf-8" ?>
<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TutoSuite;assembly=TutoSuite"
x:Class="TutoSuite.navigation.CrouselPage">
<local:Client.ClientFirstpage/>
</CarouselPage>
I have this error:
Error Position 7:7. Type Client not found in xmlns clr-namespace:TutoSuite;assembly=TutoSuite
can someone help me? thanks in advance
To fix your error, you have to add a reference to the Client namespace, because inner namespaces isn't allowed (local:Client.ClientFirstpage ).
The first step is adding the client namespace reference:
xmlns:client="clr-namespace:TutoSuite.Client"
And then use this reference for the ClientFirstpage
<?xml version="1.0" encoding="utf-8" ?>
<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TutoSuite;assembly=TutoSuite"
xmlns:client="clr-namespace:TutoSuite.Client"
x:Class="TutoSuite.navigation.CrouselPage">
<client.ClientFirstpage/>
</CarouselPage>