Skip to content

Instantly share code, notes, and snippets.

View gohilbhagirath90's full-sized avatar

Bhagirathsinh Gohil gohilbhagirath90

  • eInfochips
  • Ahmedabad, Gujarat, India
View GitHub Profile
@gohilbhagirath90
gohilbhagirath90 / Usage.java
Created July 31, 2018 16:38 — forked from abombss/Usage.java
A roboguice provider for creating a User-Agent string on android
public class MyModule extends AbstractModule {
@Override
void configure() {
bind(String.class).annotatedWith(UserAgent.class).to(UserAgentProvider.class);
}
}
public class MyComponent {
String userAgent;
@gohilbhagirath90
gohilbhagirath90 / Camera2Activity.java
Created December 14, 2016 06:23 — forked from natevogt/Camera2Activity.java
Quick-n-Dirty Camera2 Activity
package com.natevogtphoto.camera2test;
import android.app.Activity;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.graphics.ImageFormat;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCaptureSession;
import android.hardware.camera2.CameraCaptureSession.CaptureCallback;
@gohilbhagirath90
gohilbhagirath90 / vlc.html
Created January 20, 2016 10:52 — forked from mylesjao/vlc.html
vlc web plugin sample. only for IE and Firefox
<!DOCTYPE html>
<html>
<body>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
</head>
<object
public class CircularProgressDrawable extends Drawable
implements Animatable {
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator();
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator();
private static final int ANGLE_ANIMATOR_DURATION = 2000;
private static final int SWEEP_ANIMATOR_DURATION = 600;
private static final int MIN_SWEEP_ANGLE = 30;
private final RectF fBounds = new RectF();
@gohilbhagirath90
gohilbhagirath90 / getRoundedBitmap.java
Last active August 29, 2015 14:25 — forked from eveliotc/getRoundedBitmap.java
A better yet dirty way of get rounded avatars
public static Bitmap getRoundedBitmap(Bitmap bitmap) {
final Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
final Canvas canvas = new Canvas(output);
final int color = Color.RED;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
final RectF rectF = new RectF(rect);
paint.setAntiAlias(true);
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files