Skip to content

Instantly share code, notes, and snippets.

:octocat:
󠀡

jzeferino jzeferino

:octocat:
󠀡
Block or report user

Report or block jzeferino

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
@jzeferino
jzeferino / ViewPagerViewController.cs
Created Jan 11, 2019
ViewPager like ViewController
View ViewPagerViewController.cs
using System;
using UIKit;
using System.Collections.Generic;
using Foundation;
using System.Linq;
namespace CustomView
{
public class ViewPagerViewController<TData> : UIPageViewController, IUIPageViewControllerDelegate, IUIPageViewControllerDataSource
{
@jzeferino
jzeferino / Animation Fade
Created Oct 11, 2018 — forked from aloisdeniel/Animation Fade
Xamarin.iOS view common animations
View Animation Fade
public static void Fade (this UIView view, bool isIn, double duration = 0.3, Action onFinished = null)
{
var minAlpha = (nfloat)0.0f;
var maxAlpha = (nfloat)1.0f;
view.Alpha = isIn ? minAlpha : maxAlpha;
view.Transform = CGAffineTransform.MakeIdentity ();
UIView.Animate (duration, 0, UIViewAnimationOptions.CurveEaseInOut,
() => {
view.Alpha = isIn ? maxAlpha : minAlpha;
@jzeferino
jzeferino / PhotoService.cs
Last active Feb 28, 2018
Retrieves a random photo byte[]
View PhotoService.cs
// =============================================
// AUTHOR : jzeferino
// PURPOSE : A simple Xamarin introduction demo
// =============================================
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace SharedCode.Service
@jzeferino
jzeferino / Logger.cs
Created Feb 1, 2018 — forked from ankitvijay/Logger.cs
CallerInfoExample
View Logger.cs
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace CallerInfoExample
{
public static class Logger
{
public static void Log(string message,
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0,
View RvUtil.cs
public class RvUtil
{
public RvUtil (RecyclerView rv)
{
recyclerView = rv;
}
RecyclerView recyclerView;
IntPtr id_setNestedScrollingEnabled;
@jzeferino
jzeferino / NoOverScrollViewPager
Created Nov 10, 2017
NoOverScrollViewPager disable swipe in the first and last page of ViewPager
View NoOverScrollViewPager
public class NoOverScrollViewPager extends ViewPager {
float lastX;
public BorderNoSwipeViewPager(Context context) {
super(context);
}
public BorderNoSwipeViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
@jzeferino
jzeferino / remove_bin_obj_packages_from_this_directory_recursively.sh
Created Aug 16, 2017
Removes bin, obj and packages from current folder recursively
View remove_bin_obj_packages_from_this_directory_recursively.sh
#!/bin/bash
declare -a arr=("obj" "bin" "packages") # Remove/add folders you want to clean up.
read -p "Delete $(printf "%s, " "${arr[@]}")folders under $PWD? (y/n) " answer
case ${answer:0:1} in
y|Y )
for folder in "${arr[@]}"
do
echo "Cleaning $folder"
find . -name $folder -type d -exec rm -rf {} +
@jzeferino
jzeferino / Async.cake
Created Jul 9, 2017 — forked from devlead/Async.cake
Sample of using async await in a cake script using a AsyncHelper class to work with all async scenarios, currently needs "--Experimental" flag or to use the Cake.CoreCLR runner as a newer version of Roslyn is required for async to be recognized. Example invocation: cake .\AsyncHelper.cake -Experimental
View Async.cake
#load "AsyncHelper.cake"
#r "System.Net.Http"
using System.Net.Http;
using System.Net.Http.Headers;
string url = "https://icanhazdadjoke.com/";
var result = AsyncHelpers.RunSync(
async ()=> {
using(var client = new HttpClient())
@jzeferino
jzeferino / Async.cake
Created Jul 9, 2017 — forked from devlead/Async.cake
Sample of using async await in a cake script using a AsyncHelper class to work with all async scenarios, currently needs "--Experimental" flag or to use the Cake.CoreCLR runner as a newer version of Roslyn is required for async to be recognized. Example invocation: cake .\AsyncHelper.cake -Experimental
View Async.cake
#load "AsyncHelper.cake"
#r "System.Net.Http"
using System.Net.Http;
using System.Net.Http.Headers;
string url = "https://icanhazdadjoke.com/";
var result = AsyncHelpers.RunSync(
async ()=> {
using(var client = new HttpClient())
You can’t perform that action at this time.