Skip to content

Instantly share code, notes, and snippets.

🐾 Type

  • 💊 Bug fix
  • 🎁 New feature
  • 🔧 Tech improvement
  • 🔮 Experiment
  • 👻 Other
@dGorod
dGorod / AndroidManifest.xml
Created October 19, 2017 15:01
Example of new FileProvider usage
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
package com.askmirrormirror.android.presentation.common;
import android.support.annotation.ColorInt;
import android.text.Editable;
import android.text.Spanned;
import android.text.TextWatcher;
import android.text.style.CharacterStyle;
import android.text.style.ForegroundColorSpan;
import java.util.ArrayList;
package nl.groenewijkstroom.util;
import android.content.res.Resources;
import android.util.TypedValue;
/**
* Created by Dmytro Gorodnytskyi on 13-Apr-16.
*/
public class DimensionUtil {
package nl.groenewijkstroom.data.network;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import okhttp3.ResponseBody;
import retrofit2.Converter;
import retrofit2.Retrofit;
package com.exsoft.musarium.entity;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
/**
* Code snippet authored by Jacob Tabak.
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.annotation.NonNull;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.annotation.NonNull;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
/**
* Created by Dmitriy Gorodnytskiy on 24-Sep-15.
*/
@dGorod
dGorod / ArcUtils.java
Created July 13, 2016 07:09 — forked from Takhion/ArcUtils.java
Collection of methods to achieve better circular arc drawing, as Canvas.drawArc() is unreliable. See the related article: https://medium.com/p/9155f49166b8
/**
* ArcUtils.java
*
* Copyright (c) 2014 BioWink GmbH.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is