Skip to content

Instantly share code, notes, and snippets.

View hiking93's full-sized avatar

Hsingchien Cheng (工程師 Hiking) hiking93

View GitHub Profile
@paulocaldeira17
paulocaldeira17 / AppBarStateChangeListener.java
Last active December 21, 2023 09:50
Android AppBarLayout collapsed/expanded state listener
import android.support.design.widget.AppBarLayout;
/**
* App bar collapsing state
* @author Paulo Caldeira <paulo.caldeira@acin.pt>.
*/
public abstract class AppBarStateChangeListener implements AppBarLayout.OnOffsetChangedListener {
// State
public enum State {
EXPANDED,
Error code Error summary Error description
1 No network connectivity There is no internet connection
2 Missing ad controller Could happen when ad has not been prepared yet
3 No context A valid context is missing
4 Invalid ad unit
17 Ad not ready Triggered when you call displayAd() on an ad object that is not ready
18 Wrong orientation Device is in wrong orientation for banner or interstitial ads
19 No view group Banner ad wasn't placed in a ViewGroup
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@christopherperry
christopherperry / adb+
Created July 30, 2012 16:12
A bash script that let's you issue adb commands to multiple devices at once
#!/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
@romannurik
romannurik / SwipeDismissListViewTouchListener.java
Last active May 1, 2021 10:16
**BETA** Android 4.0-style "Swipe to Dismiss" sample code
Moved to
https://github.com/romannurik/android-swipetodismiss
@tsabat
tsabat / zsh.md
Last active December 25, 2023 19:16
Getting oh-my-zsh to work in Ubuntu