This file contains 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
namespace BeatlesApp | |
{ | |
public class TagEffect : RoutingEffect | |
{ | |
public TagEffect() : base("BeatlesApp.TagEffect") {} | |
public static readonly BindableProperty TagProperty = | |
BindableProperty.CreateAttached("Tag", typeof(int), typeof(TagEffect), 0, propertyChanged: OnTagChanged); | |
public static int GetTag(BindableObject view) |
This file contains 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 TransitionAnimator : UIViewControllerAnimatedTransitioning | |
{ | |
private const double _duration = 0.5; | |
public override void AnimateTransition(IUIViewControllerContextTransitioning transitionContext) | |
{ | |
var containerView = transitionContext.ContainerView; | |
var toView = transitionContext.GetViewFor(UITransitionContext.ToViewKey); | |
containerView.AddSubview(toView); |
This file contains 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
class CounterStore : INotifyPropertyChanged | |
{ | |
private readonly CounterReducer reducer = new CounterReducer(); | |
private CounterState state; | |
public CounterStore(CounterState initialState) | |
{ | |
state = initialState; | |
} |
This file contains 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
class CounterReducer | |
{ | |
public CounterState Reduce(CounterState state, object action) | |
{ | |
switch (action) | |
{ | |
case IncrementAction i: | |
return ProcessIncrement(state); | |
case DecrementAction d: | |
return ProcessDecrement(state); |
This file contains 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
class IncrementAction { } | |
class DecrementAction { } |
This file contains 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
class CounterState | |
{ | |
public CounterState(int count) { Count = count; } | |
public int Count { get; } | |
} |
This file contains 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
#!/bin/sh | |
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png |