Skip to content

Instantly share code, notes, and snippets.

View suweya's full-sized avatar
🎯
Focusing

weiyang.su suweya

🎯
Focusing
View GitHub Profile
@suweya
suweya / SlideView.java
Created July 14, 2017 03:46
Lock screen slide view
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.support.annotation.Nullable;
import android.support.v4.view.MotionEventCompat;
import android.util.AttributeSet;
@suweya
suweya / MoveViewTouchListener.java
Created July 14, 2017 03:13 — forked from slightfoot/MoveViewTouchListener.java
Move View Touch Listener Example
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
/**
* @author Simon Lightfoot <simon@demondevelopers.com>
*/
public class MoveViewTouchListener
implements View.OnTouchListener
{
@suweya
suweya / FileUtil.java
Last active February 17, 2023 03:39
OkHttp download file by Okio
import android.os.Environment;
import android.support.annotation.NonNull;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.TimeUnit;
@suweya
suweya / OkHttpStack.java
Last active September 9, 2020 13:37 — forked from bryanstern/OkHttpStack.java
An OkHttp backed HttpStack for Volley
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Circle Internet Financial
*
* 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