Skip to content

Instantly share code, notes, and snippets.

View davidtavarez's full-sized avatar
🎯
Focusing

David davidtavarez

🎯
Focusing
View GitHub Profile
@davidtavarez
davidtavarez / UserDialogsGood.cs
Created August 12, 2015 15:12
Acr.UserDialogs working GOOD
using System;
using Acr.UserDialogs;
using Xamarin.Forms;
namespace BugUserDialogs
{
public class App : Application
{
public App ()
@davidtavarez
davidtavarez / LineEntry.cs
Last active April 6, 2022 20:09
Xamarin.Forms Entry just with bottom border.
using Xamarin.Forms;
namespace YOUTNAMESPACE
{
public class LineEntry : Entry
{
public static readonly BindableProperty BorderColorProperty =
BindableProperty.Create<LineEntry, Color> (p => p.BorderColor, Color.Black);
public Color BorderColor {
[alias] tree = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
private static Bitmap getCropBitmap (Bitmap origialBitmap,int left, int top, int right, int bottom){
int targetWidth = right-left;
int targetHeight = bottom-top;
Bitmap cutBitmap = Bitmap.createBitmap(targetWidth,targetHeight, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(cutBitmap);
Rect desRect = new Rect(0, 0, targetWidth, targetHeight);
Rect srcRect = new Rect(left, top, right, bottom);
canvas.drawBitmap(origialBitmap, srcRect, desRect, null);
return cutBitmap;
}
@davidtavarez
davidtavarez / Helpers.java
Created March 8, 2014 16:11
Some java functions to help any Android developer.
package com.dt.memmo.tools;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.hardware.Camera;