Skip to content

Instantly share code, notes, and snippets.

View jimmgarrido's full-sized avatar

Jimmy Garrido jimmgarrido

View GitHub Profile
@jimmgarrido
jimmgarrido / AdjustResize.md
Last active December 12, 2019 05:36
AdjustResize Workaround for Xamarin.Forms

Forms 2.3.3+

Uses the new Platform Specifics feature

protected override void OnCreate(Bundle bundle)
{
	ToolbarResource = Resource.Layout.toolbar;
	TabLayoutResource = Resource.Layout.tabs;

	base.OnCreate(bundle);
@jimmgarrido
jimmgarrido / CustomTabbedRenderer
Created September 2, 2016 15:56
Hide 'More' Tab Navbar
using System;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using xamtabproblem.iOS;
[assembly:ExportRenderer(typeof(TabbedPage), typeof(CustomTabbedRenderer))]
namespace xamtabproblem.iOS
{
public class CustomTabbedRenderer : TabbedRenderer
@jimmgarrido
jimmgarrido / build task
Last active April 13, 2017 17:36
Forms build examples
<Target Name="AfterBuild">
<ItemGroup>
<AssemblyFiles Include="$(OutputPath)\*.dll;$(OutputPath)\*.pdb;$(OutputPath)\*.pri"/>
<XmlFile Include="$(OutputPath)\*.xr.xml" />
<RdFile Include="$(ProjectDir)\Properties\*.rd.xml"/>
</ItemGroup>
<Copy SourceFiles="@(AssemblyFiles)" DestinationFolder="C:\Users\jigarrid\Documents\_Xamarin Work\UWP Forms" />
<Copy SourceFiles="@(XmlFile)" DestinationFolder="C:\Users\jigarrid\Documents\_Xamarin Work\UWP Forms\Xamarin.Forms.Platform.UAP" />
<Copy SourceFiles="@(RdFile)" DestinationFolder="C:\Users\jigarrid\Documents\_Xamarin Work\UWP Forms\Xamarin.Forms.Platform.UAP\Properties" />
@jimmgarrido
jimmgarrido / workaround.md
Last active October 2, 2018 07:37
Broken Support Library Download Workaround

1. Go to %LOCALAPPDATA%\Xamarin

2. If it doesn't already exist, create a new folder named after the support library NuGet package, e.g. Xamarin.Android.Support.v4

3. Repeat for every support library package in your project:

4. Open the Xamarin Android SDK Manager and download the Android Support Repository (under Tools > Extras):

5. Go to [Android SDK location]\extras\android\m2repository\com\android\support and open the directory for the support library you need

6. Find the correct version and copy the entire folder to directory you created in step 2. The correct version is the one that matches or is nearest to the NuGet package version. For example, if the package version is 23.4.0.1 the support library version would be 23.4.0. If you did not create a folder in

@jimmgarrido
jimmgarrido / Hang Stacktrace.md
Last active October 25, 2019 22:55
Visual Studio for Mac Collect Diagnostic Info

Collecting Stacktrace information

  1. Open Activity Monitor.app
  2. Under the "CPU" tab, find the "Visual Studio" process and note its PID (should be 2nd to last column)
  3. Open a terminal window
  4. Run kill -QUIT [VS PID] to dump the current thread stack into the current log file (not in the terminal)
  5. Zip up the logs from Visual Studio > Help > Open Log Directory