<repo_name>Neotrickster/RTvPlayer<file_sep>/README.md
# RTvPlayer
RTv Player
xamarin forms scaling background image

https://stackoverflow.com/questions/31853389/how-to-prevent-background-image-being-squeezed-when-the-keyboard-opens

https://forums.xamarin.com/discussion/64304/how-can-stretch-background-content-image

https://github.com/martijn00/XamarinMediaManager/issues/310

https://montemagno.com/beautiful-android-splash-screens/

https://medium.com/@thesultanster/xamarin-splash-screens-the-right-way-3d206120726d

https://github.com/eggeggss/Xamarin-Form-SplashScreen-Animation

https://auri.net/2016/11/20/how-to-setting-up-macos-x-sierra-on-virtualbox-for-xamarin-development-with-visual-studio/

http://bitsof.net/xamarin-ios-apps-without-physical-mac/

https://plus.google.com/+SysAdminsHowtos/posts/6e98eRghsw1

https://docs.microsoft.com/en-us/xamarin/ios/get-started/installation/windows/connecting-to-mac/
<file_sep>/RTvPlayer/RTvPlayer/ViewModels/RadioTelevisionCanalesViewModel.cs
﻿using System;
using System.Collections.Generic;
using System.Text;
using ILCE.ViewModels;

namespace RTvPlayer.ViewModels
{
    class RadioTelevisionCanalesViewModel : BaseViewModel
    {
        public int screenSizeHeight { get; set; }

        public RadioTelevisionCanalesViewModel()
        {
            Title = "ILCE - Radio y Televisión";

            var size = Plugin.XamJam.Screen.CrossScreen.Current.Size;
            screenSizeHeight = (int)((size.Height - 50) / 4);
        }
    }
}
<file_sep>/RTvPlayer/RTvPlayer/Views/SummaSaberes.xaml.cs
﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RTvPlayer.ViewModels;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace RTvPlayer.Views
{
	[XamlCompilation(XamlCompilationOptions.Compile)]
	public partial class SummaSaberes : ContentPage
	{
		public SummaSaberes ()
		{
			InitializeComponent ();
		    BindingContext = new SummaSaberesViewModel();

		    VideoPlayerSS.FullScreenStatusChanged += VideoPlayer_FullScreenStatusChanged;
        }

        private void VideoPlayer_FullScreenStatusChanged(object sender, bool value)
        {
            NavigationPage.SetHasNavigationBar(this, !value);
        }

        private double _width = 0;
        private double _height = 0;

        protected override void OnSizeAllocated(double width, double height)
        {
            base.OnSizeAllocated(width, height); //must be called
            if (this._width != width || this._height != height)
            {
                this._width = width;
                this._height = height;
                //reconfigurar layout cuando se gira el teléfono
                if (width > height)
                {
                    //outerStack.Orientation = StackOrientation.Horizontal;
                    //outterScroll.IsVisible = true;
                    innerStack.IsVisible = false;
                    outerStack.BackgroundColor = Color.Black;
                    //this.BackgroundColor = Color.Aqua;
                    //innerGrid.IsVisible = false;
                    //Canal.IsVisible = false;
                    //VideoPlayer.
                    //InvalidateMeasure();
                }
                else
                {
                    //outerStack.Orientation = StackOrientation.Vertical;
                    //outterScroll.IsVisible = false;
                    innerStack.IsVisible = true;
                    outerStack.BackgroundColor = Color.White;
                    //this.BackgroundColor = Color.Chartreuse;
                    //innerGrid.IsVisible = true;
                    //Canal.IsVisible = true;
                    //Canal.Text = Canal.Text + "(" + this._width + ")" + "(" + this._height + ")";
                    //InvalidateMeasure();
                }
            }
        }

        private async Task BtnPlayCI_OnClicked(object sender, EventArgs e)
        {
            VideoPlayerSS.Stop();
            //VideoPlayerCI.IsVisible = false;
            //await this.Navigation.PushAsync(new RTvCanales());
            //await this.Navigation.PushModalAsync(new RTvCanales());
            App.Current.MainPage = new CanalIberoamericano();
            //App.Current.MainPage = new NavigationPage(new RTvCanales());
        }

	    private void BtnPlayIR_OnClicked(object sender, EventArgs e)
	    {
	        VideoPlayerSS.Stop();
	        App.Current.MainPage = new IberoamericaRadio();
        }
	}
}<file_sep>/RTvPlayer/RTvPlayer/App.xaml.cs
﻿using RTvPlayer.Views;
using Xamarin.Forms;

namespace RTvPlayer
{
	public partial class App : Application
	{
		public App ()
		{
			InitializeComponent();

            MainPage = new RadioTelevisionCanales(); //RadioTelevisionCanales(); //IberoamericaRadio(); //CanalIberoamericano(); //RTvCanales();
            //MainPage = new NavigationPage(new RadioTelevisionCanales());
            //NavigationPage.SetHasNavigationBar(MainPage, false);
        }

        protected override void OnStart ()
		{
			// Handle when your app starts
		}

		protected override void OnSleep ()
		{
			// Handle when your app sleeps
		}

		protected override void OnResume ()
		{
			// Handle when your app resumes
		}
	}
}
<file_sep>/RTvPlayer/RTvPlayer/ViewModels/IberoamericaRadioViewModel.cs
﻿using System;
using System.Collections.Generic;
using System.Text;
using ILCE.ViewModels;

namespace RTvPlayer.ViewModels
{
    class IberoamericaRadioViewModel : BaseViewModel
    {
        public int screenSizeHeight { get; set; }

        public IberoamericaRadioViewModel()
        {
            Title = "Iberoamerica Radio";

            var size = Plugin.XamJam.Screen.CrossScreen.Current.Size;
            screenSizeHeight = (int)((size.Height - 270) / 3);
        }
    }
}
<file_sep>/RTvPlayer/RTvPlayer/ViewModels/RTvCanalesViewModel.cs
﻿using ILCE.ViewModels;

namespace RTvPlayer.ViewModels
{
    class RTvCanalesViewModel : BaseViewModel
    {
        public int screenSizeHeight { get; set; }

        public RTvCanalesViewModel()
        {
            Title = "ILCE RTv";

            var size = Plugin.XamJam.Screen.CrossScreen.Current.Size;
            screenSizeHeight = (int)((size.Height - 270) / 4);
        }
    }
}
<file_sep>/RTvPlayer/RTvPlayer/ViewModels/CanalIberoamericanoViewModel.cs
﻿using System;
using System.Collections.Generic;
using System.Text;
using ILCE.ViewModels;

namespace RTvPlayer.ViewModels
{
    class CanalIberoamericanoViewModel : BaseViewModel
    {
        public int screenSizeHeight { get; set; }

        public CanalIberoamericanoViewModel()
        {
            Title = "Canal Iberoamericano";

            var size = Plugin.XamJam.Screen.CrossScreen.Current.Size;
            screenSizeHeight = (int)((size.Height - 270) / 4);
        }
    }
}
