Skip to content

Instantly share code, notes, and snippets.

View Redth's full-sized avatar
🏠
Working from home

Jonathan Dick Redth

🏠
Working from home
View GitHub Profile
@Redth
Redth / IUILayoutSupportExtensions.cs
Created September 26, 2013 15:37
The Length property is currently missing from the Xamarin.iOS API for IUILayoutSupport (TopLayoutGuide, BottomLayoutGuide). Here's a quick hack to fix it temporarily...
using MonoTouch.UIKit;
using MonoTouch.ObjCRuntime;
namespace Shield
{
public static class TopLayoutGuideExtensions
{
public static float Length(this IUILayoutSupport layoutSupport)
{
float length = 0f;// = 0;
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace EggsTest
{
public void SetProgress(int i)
{
isSpinning = false;
var newProgress = (int)((float)i / (float)100 * (float)360);
if (version >= Android.OS.BuildVersionCodes.Honeycomb)
{
Android.Animation.ValueAnimator va =
(Android.Animation.ValueAnimator)Android.Animation.ValueAnimator.OfInt (progress, newProgress).SetDuration (250);
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Hardware;
namespace HeyKarlWakeUp
@Redth
Redth / LogCollector.cs
Created June 25, 2013 20:35
Collect Android Logs and Version info in Xamarin.Android
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
// This file is automatically generated and not supposed to be modified.
using System;
using Boolean = System.Boolean;
using String = System.String;
using List = Android.Runtime.JavaList;
using Map = Android.Runtime.JavaDictionary;
using Android.OS;
namespace Com.Android.Vending.Billing
{
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Redth
Redth / Xamarin.Flurry.cs
Created May 9, 2013 19:04
Flurry analytics for Xamarin.iOS, Xamarin.Android, Windows Phone
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#if MONODROID
using Android.Telephony;
#endif
#if MONOTOUCH
using MonoTouch.Foundation;
using System.Drawing;
using System;
using MonoTouch.UIKit;
using MonoTouch.CoreGraphics;
using System.Runtime.InteropServices;
namespace ZXing
{
public partial class RGBLuminanceSource
@Redth
Redth / CodeShareReport.cs
Created November 27, 2012 18:05 — forked from praeclarum/CodeShareReport.cs
Computes the code share stats for the iCircuit project
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.IO;
namespace CodeShareReport
{
class App