Skip to content

Instantly share code, notes, and snippets.

View jzeferino's full-sized avatar
:octocat:
󠀡

jzeferino jzeferino

:octocat:
󠀡
View GitHub Profile
@jzeferino
jzeferino / build.gradle
Created April 13, 2017 15:26 — forked from alexsinger/build.gradle
Separate Crashlytics reporting for debug and release buildTypes using a Gradle build
// The following code allows an app to report Crashlytics crashes separately
// for release and debug buildTypes when using Gradle. This code should be inserted
// into the specified locations within your build.gradle (Module:app) file
// The buildTypes { } block should be inserted inside the android { } block
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ext.crashlyticsApiSecret = "release api secret"
@jzeferino
jzeferino / build.gradle
Created April 13, 2017 15:26 — forked from alexsinger/build.gradle
Separate Crashlytics reporting for debug and release buildTypes using a Gradle build
// The following code allows an app to report Crashlytics crashes separately
// for release and debug buildTypes when using Gradle. This code should be inserted
// into the specified locations within your build.gradle (Module:app) file
// The buildTypes { } block should be inserted inside the android { } block
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ext.crashlyticsApiSecret = "release api secret"
@jzeferino
jzeferino / Async.cake
Created July 9, 2017 19:00 — 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
#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 July 9, 2017 19:00 — 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
#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 / NoOverScrollViewPager
Created November 10, 2017 14:21
NoOverScrollViewPager disable swipe in the first and last page of ViewPager
public class NoOverScrollViewPager extends ViewPager {
float lastX;
public BorderNoSwipeViewPager(Context context) {
super(context);
}
public BorderNoSwipeViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
@jzeferino
jzeferino / RvUtil.cs
Created January 4, 2018 15:39 — forked from Redth/RvUtil.cs
public class RvUtil
{
public RvUtil (RecyclerView rv)
{
recyclerView = rv;
}
RecyclerView recyclerView;
IntPtr id_setNestedScrollingEnabled;
@jzeferino
jzeferino / Logger.cs
Created February 1, 2018 09:45 — forked from ankitvijay/Logger.cs
CallerInfoExample
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,
@jzeferino
jzeferino / xamarinandroidbindings.md
Created June 13, 2016 09:06 — forked from JonDouglas/xamarinandroidbindings.md
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@jzeferino
jzeferino / DrawerMenuCustomFontHack.java
Created November 5, 2016 13:00
Hack custom font in drawer menu with calligraphy
public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
@jzeferino
jzeferino / SuffixEditText
Last active February 7, 2018 15:42
Edit text with suffix
using Android.Content;
using Android.Util;
using Android.Widget;
using Android.Runtime;
using System;
using Android.Text;
namespace Utils
{
public class SuffixEditText : EditText