Skip to content

Instantly share code, notes, and snippets.

View rmarinho's full-sized avatar

Rui Marinho rmarinho

View GitHub Profile
@rmarinho
rmarinho / gist:f81aefe1982c91e3671b
Created November 13, 2014 22:05
Custom Annotation
public class CustomAnnotationView : MKAnnotationView
{
public Item CurrentData {get;set;}
public TipCategory CurrentCategory {get;set;}
UIImageView imgMarker;
UILabel lblTitle;
UIButton btnGoTodetail;
MKMapView mapView;
public CustomAnnotationView (MKMapView map, Item it, TipCategory cat)
@rmarinho
rmarinho / CustomCell Renderer
Created November 17, 2014 18:24
Workaround for Listview SelectedItem issues with buttons on the ViewCell
//Create a renderer for the viewcell
public class CustomCell : ViewCellRenderer
{
protected override global::Android.Views.View GetCellCore (Cell item, global::Android.Views.View convertView, ViewGroup parent, Context context)
{
var cell = base.GetCellCore (item, convertView, parent, context);
(cell as ViewGroup).DescendantFocusability = DescendantFocusability.BlockDescendants;
return cell;
}
}
@rmarinho
rmarinho / gist:7407cb0d64ed54095b3c
Created November 18, 2014 10:46
Crash info XS MacOSX
Process: XamarinStudio [2285]
Path: /Applications/Xamarin Studio.app/Contents/MacOS/XamarinStudio
Identifier: com.xamarin.monodevelop
Version: 5.5.4.14 (5.5.4.14)
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: XamarinStudio [2285]
User ID: 501
Date/Time: 2014-11-18 10:45:04.684 +0000
@rmarinho
rmarinho / gist:99d483ee5b0de9520019
Created November 18, 2014 14:00
DEFAULT_SCRIM_COLOR
const uint DEFAULT_SCRIM_COLOR = 0x99000000;
unchecked
{
SetScrimColor ((int)DEFAULT_SCRIM_COLOR);
}
@rmarinho
rmarinho / build
Last active August 29, 2015 14:10
Output
Building: emptyUnified (Debug|iPhoneSimulator)
Build started 11/25/2014 4:15:22 PM.
__________________________________________________
Project "/Users/rmarinho/Projects/emptyUnified/emptyUnified/emptyUnified.csproj" (Build target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: iPhoneSimulator
Target _DetectSdkLocations:
@rmarinho
rmarinho / gist:ddb07a9222eaed488034
Created November 25, 2014 16:25
simulator crash
Process: emptyUnified [4274]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/21A16733-4D76-4213-88CD-A53AB0C5C25B/data/Applications/A1346C22-24E2-45EA-AFEE-C7E8086D4CEA/emptyUnified.app/emptyUnified
Identifier: emptyUnified
Version: ???
Code Type: X86 (Native)
Parent Process: launchd_sim [3644]
Responsible: launchd_sim [3644]
User ID: 501
Date/Time: 2014-11-25 16:23:19.719 +0000
@rmarinho
rmarinho / gist:7dcfaf6e960bd86179c9
Created November 27, 2014 18:08
Sharing violation on path
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x0034b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO/FileStream.cs:320
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO/FileStream.cs:190
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs:129
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor (System.String path, FileMode mode, FileAccess access, System.IO.IsolatedStorage.IsolatedStorageFile isf) [0x00000] in /Developer/
ommand: "D:\home\site\deployments\tools\deploy.cmd"
Handling ProjectK Web Application deployment.
KRE-svr50-x86.1.0.0-alpha3 already installed.
Adding C:\DWASFiles\Sites\~1dn90\UserProfile\.kre\packages\KRE-svr50-x86.1.0.0-alpha3\bin to process PATH
Restoring packages for D:\home\site\repository\src\DN90\project.json
----------
System.AggregateException: One or more errors occurred. ---> Newtonsoft.Json.JsonReaderException: Error parsing comment. Expected: *, got /. Path 'dependencies.Microsoft.AspNet.Mvc', line 9, position 10.
at Newtonsoft.Json.JsonTextReader.ParseComment()
at Newtonsoft.Json.JsonTextReader.ParseObject()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
public static Page GetMainPage ()
{
var root = new StackLayout ();
for (double i = 1; i < 50; i+=0.5) {
var font = Font.SystemFontOfSize (i);
root.Children.Add(new Label{ Font = font, Text =string.Format("Text with FontSize {0}",i)} );
}
@rmarinho
rmarinho / freddy scroll
Created December 15, 2014 12:21
scrollview
class Demopage : ContentPage
{
public Demopage ()
{
Label label1 = new Label
{
Text = "Label11",
Font = Font.BoldSystemFontOfSize(50),
HorizontalOptions = LayoutOptions.Center
};