Skip to content

Instantly share code, notes, and snippets.

😊
Always happy

Yoshito Tabuchi ytabuchi

😊
Always happy
Block or report user

Report or block ytabuchi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ytabuchi
ytabuchi / snippets.md
Last active Aug 23, 2019
Custom Renderer Snippets
View snippets.md

Snippet for CustomRenderer

Xamarin.Forms / NakayokunaruHandsOn.xaml.cs

public App()
{
    InitializeComponent();

    var rootPage = new ContentPage();
@ytabuchi
ytabuchi / Error
Last active Jan 15, 2019
Build error for c++ library
View Error
SIMPLE: CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
SIMPLE: CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
@ytabuchi
ytabuchi / MainPage.xaml.cs
Last active Dec 19, 2018
Realm Query-Based Sync
View MainPage.xaml.cs
#define FullSync
//#define QueryBasedSync
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
@ytabuchi
ytabuchi / error.log
Created Oct 19, 2018
Kudan sample app error when debug on gl07s (4.1.2)
View error.log
10-18 19:34:35.419 331-331/? I/ActivityManager: Force stopping package eu.kudan.ar uid=10106
10-18 19:34:35.425 331-346/? I/AlarmManager: Remove eu.kudan.ar from mIntentHisRW
10-18 19:34:36.089 331-573/? I/ActivityManager: START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=eu.kudan.ar/.MainActivity u=0} from pid 5498
10-18 19:34:36.119 331-1860/? I/ActivityManager: Start proc eu.kudan.ar for activity eu.kudan.ar/.MainActivity: pid=5509 uid=10106 gids={1006, 3003, 1028, 1015}
10-18 19:34:36.512 5509-5509/? D/dalvikvm: Trying to load lib /data/data/eu.kudan.ar/lib/libKudan.so 0x426b9720
10-18 19:34:36.512 5509-5509/? W/dalvikvm: Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Leu/kudan/kudan/ARAPIKey;
10-18 19:34:36.515 5509-5509/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at eu.kudan.ar.MainActivity.onCreate(MainActivity.kt:37)
at android.app.Activity.performCreate(Activity.java:5031)
@ytabuchi
ytabuchi / ShowDialog_Android.cs
Created Sep 4, 2017
ShowDialog method in Android
View ShowDialog_Android.cs
var alert = new AlertDialog.Builder(this); //引数に Android.Content.Context contextが必要。
alert.SetTitle("Title");
alert.SetMessage("Message");
alert.SetPositiveButton("OK", (sender, e) => { });
alert.Show();
// OnCreateDialogで作成せよ。議論は取り合えず置いておきます。
@ytabuchi
ytabuchi / ShowDialog_iOS.cs
Last active Sep 4, 2017
ShowDialog method in iOS
View ShowDialog_iOS.cs
var alert = UIAlertController.Create(title, message, UIAlertControllerStyle.Alert);
alert.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, (obj) => { }));
PresentViewController(alert, true, null); // UIViewController.PresentViewControllerを利用
View SvgPageXaml.xaml
<ScrollView Padding="8">
<StackLayout>
<svg:SvgImage SvgPath="{Binding AppStorePath}"
SvgAssembly="{Binding SvgAssembly}"
WidthRequest="135"
HeightRequest="40"
HorizontalOptions="Center"/>
<svg:SvgImage SvgPath="{Binding CoolMaskPath}"
SvgAssembly="{Binding SvgAssembly}"
WidthRequest="100"
View SvgPageViewModel.cs
public Assembly SvgAssembly
{
get { return typeof(App).GetTypeInfo().Assembly; }
}
public string AppStorePath
{
get { return "SvgSample.Resources.AppStore.svg"; }
}
public string CoolMaskPath
@ytabuchi
ytabuchi / SvgPageCS.cs
Created Mar 24, 2017
Loading SVG iamges
View SvgPageCS.cs
var appStore = new SvgImage
{
SvgPath = "SvgSample.Resources.AppStore.svg",
SvgAssembly = typeof(App).GetTypeInfo().Assembly,
WidthRequest = 135,
HeightRequest = 40,
HorizontalOptions = LayoutOptions.Center
};
var coolMask = new SvgImage
{
View StackLayoutExpandSample.cs
var stack = new StackLayout
{
Children =
{
new BoxView
{
HeightRequest = 100,
BackgroundColor = Color.FromHex("cccccc")
},
new BoxView
You can’t perform that action at this time.