Skip to content

Instantly share code, notes, and snippets.

View wuyexiong's full-sized avatar

哈哈熊仔 wuyexiong

  • Shenzhen, China
View GitHub Profile
package com.?
import java.io.File;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Build;
import android.os.StatFs;
import com.squareup.picasso.Downloader;
package com.mi.mishophome.util;
import android.support.v4.util.SparseArrayCompat;
import android.view.View;
import android.widget.AbsListView;
/**
* Created by wuyexiong on 12/2/14.
*/
public class ListViewScrollTracker {
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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
#!/bin/bash
#Modify this with your IP range
MY_IP_RANGE="192\.168\.1"
#You usually wouldn't have to modify this
PORT_BASE=5555
#List the devices on the screen for your viewing pleasure
adb devices
package com.magicmicky.loosecoopling;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
package your_package;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
@wuyexiong
wuyexiong / adb-wrapper.sh
Last active December 11, 2018 04:36
This is a wrapper for adb. If there are multiple devices / emulators, this script will prompt for which device to use
#!/bin/bash
#study from here! pretty tool
#http://mitsnosrap.wordpress.com/2013/01/25/android-wrapper-for-adb/
# This is a wrapper for adb. If there are multiple devices / emulators, this script will prompt for which device to use
# Then it'll pass whatever commands to that specific device or emulator.
# Run adb devices once, in event adb hasn't been started yet
BLAH=$(adb devices)
#!/bin/bash
## Waking up ADB just in case
adb devices
## Desired files **REPLACE THESE WITH VALID FILEPATHS FOR YOUR APP**
FILEPATH_01="/data/data/com.example.app/databases/example.db"
FILEPATH_02="/data/data/com.example.app/shared_prefs/com.example.app_preferences.xml"
@wuyexiong
wuyexiong / adb+.sh
Created July 21, 2014 09:11
Here's a simple bash script for easily installing and uninstalling APKs with multiple devices connected to a computer.
#!/bin/bash
# Script adb+
# Usage
# You can run any command adb provides on all your currently connected devices
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command>
#
# Examples
# ./adb+ version
# ./adb+ install apidemo.apk
# ./adb+ uninstall com.example.android.apis
import com.android.volley.toolbox.HurlStack;
import com.squareup.okhttp.OkHttpClient;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which
* uses OkHttp as its transport.
*/