Skip to content

Instantly share code, notes, and snippets.

View zakrodionov's full-sized avatar
🇺🇦
Peace For Ukraine

Zakhar Rodionov zakrodionov

🇺🇦
Peace For Ukraine
View GitHub Profile
@zakrodionov
zakrodionov / SampleAuthenticator.kt
Created February 27, 2020 07:48 — forked from farhanjk/SampleAuthenticator.kt
Sample Okhttp3 Authenticator
/*
SampleAuthenticator (c) by Farhan Khan
SampleAuthenticator is licensed under a
Creative Commons Attribution 3.0 Unported License.
http://creativecommons.org/licenses/by/3.0/
*/
class SampleAuthenticator(
@zakrodionov
zakrodionov / SignatureCheck.java
Last active June 13, 2019 11:38 — forked from scottyab/SignatureCheck.java
Simple Android signature check. It's not bullet proof but does increase the difficulty of backdooring the app #security
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
public class TamperCheck {
//we store the hash of the signture for a little more protection
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846";
@zakrodionov
zakrodionov / CountryAutoCompleteAdapter.java
Created December 17, 2018 06:49 — forked from sdex/CountryAutoCompleteAdapter.java
Android: AutoCompleteTextView with Realm.io database
/*
* Copyright 2015 Yuriy Mysochenko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
package com.kevicsalazar.utils;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.view.View;
public class AnimationUtils {
// Attention
public static AnimatorSet loadBounceAnimator(View target) {
AnimatorSet animatorSet = new AnimatorSet();
@zakrodionov
zakrodionov / DialogFragAnim_snippet.java
Last active June 13, 2019 12:09 — forked from jasco/DialogFragAnim_snippet.java
DialogFragment enter/exit animations #view #animation
// example courtesy of http://adilatwork.blogspot.com/2012/11/android-dialogfragment-enter-and-exit.html
// file location: src/main/java/com/example/
@Override
public void onStart() {
super.onStart();
// safety check
if (getDialog() == null) {
return;
@zakrodionov
zakrodionov / gist:52c8722d3f0d2f1b8fcce19a7bde6189
Last active June 13, 2019 12:09 — forked from orhanobut/gist:8665372
Up down animation for dialog fragment / Выезжает снизу #view #animation
// Slide up animation
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:fromYDelta="100%"
android:interpolator="@android:anim/accelerate_interpolator"
android:toXDelta="0" />