I'm very new to Xamarin.Forms (2 weeks) so I've been running into many errors, warnings, etc...
Right now I'm trying to run an app with just one page but there are 5 images that are being used as background for buttons and that's it.
But every time I run the android app on my phone or the emulator (Windows app runs fine), I get the "OutofMemory Error"... I'm lost here, I don't even have so much code on it...
If anyone could tell me what I'm doing wrong or give me a clue on how to solve it, I'll really appreciate it!!
MainPage.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:PAEC"
x:Class="PAEC.MainPage">
<Grid >
<Image Source="background.png" Aspect="AspectFill"/>
<StackLayout VerticalOptions="Center" HorizontalOptions="Fill">
<Button
Image="Circle_Green.png"
BackgroundColor="Transparent"
/>
<Button
Image="Circle_Red.png"
BackgroundColor="Transparent"
/>
<Button
Image="Circle_Blue.png"
BackgroundColor="Transparent"
/>
<Button
Image="Circle_Grey.png"
BackgroundColor="Transparent"
/>
<Button
Image="Circle_Orange.png"
BackgroundColor="Transparent"
/>
</StackLayout>
</Grid>
</ContentPage>
MainPage.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace PAEC
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
}
}
