This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using GradientColorDemo.Droid; | |
using GradientColorDemo.CustomControls; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.Android; | |
[assembly: ExportRenderer(typeof(GradientColorStack), typeof(GradientColorStackRenderer))] | |
namespaceDroid { | |
public class GradientColorStackRenderer: VisualElementRenderer < StackLayout > { | |
private Color StartColor { | |
get; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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:GradientColorDemo.CustomControls; assembly:GradientColorDemo" | |
x:Class="GradientColorDemo.Views.GradientColorPage"> | |
<Grid VerticalOptions="FillAndExpand" RowSpacing="0"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="*" /> | |
<RowDefinition Height="*" /> </Grid.RowDefinitions> | |
<Grid Grid.Row="0" BackgroundColor="#3e5151"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xamarin.Forms; | |
namespace GradientColorDemo.CustomControls { | |
public class GradientColorStack: StackLayout { | |
public Color StartColor { | |
get; | |
set; | |
} | |
public Color EndColor { | |
get; | |
set; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xamarin.Forms.Xaml; | |
... | |
[XamlCompilation (XamlCompilationOptions.Compile)] | |
public class HomePage : ContentPage | |
{ | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xamarin.Forms.Xaml; | |
... | |
[assembly: XamlCompilation (XamlCompilationOptions.Compile)] | |
namespace PhotoApp | |
{ | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PropertyGroup> | |
... | |
<AndroidExplicitCrunch>true</AndroidExplicitCrunch> | |
</PropertyGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AudioPlayerViewModel: INotifyPropertyChanged | |
{ | |
private IAudioPlayerService _audioPlayer; | |
private bool _isStopped; | |
public event PropertyChangedEventHandler PropertyChanged; | |
public AudioPlayerViewModel(IAudioPlayerService audioPlayer) | |
{ | |
_audioPlayer = audioPlayer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AudioPlayerService : IAudioPlayerService | |
{ | |
private MediaPlayer _mediaPlayer; | |
public Action OnFinishedPlaying { get; set; } | |
public AudioPlayerService() | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AudioPlayerService : IAudioPlayerService | |
{ | |
private AVAudioPlayer _audioPlayer = null; | |
public Action OnFinishedPlaying { get; set; } | |
public AudioPlayerService() | |
{ | |
} | |
public void Play(string pathToAudioFile) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<StackLayout Padding="40" Spacing="10"> | |
<local:ImageEntry TextColor="White" | |
PlaceholderColor="{StaticResource primary}" | |
Image="user" | |
Placeholder="Emil" | |
HorizontalOptions="FillAndExpand"/> | |
</StackLayout> |