This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RecyclerViewSwipeHelper swipeHelper = new RecyclerViewSwipeHelper(this, listView) { | |
| @Override | |
| public void instantiateUnderlayButton(RecyclerView.ViewHolder viewHolder, List<UnderlayButton> underlayButtons) { | |
| underlayButtons.add(new RecyclerViewSwipeHelper.UnderlayButton( | |
| "Delete", | |
| 0, | |
| Color.parseColor("#FF3C30"), | |
| new RecyclerViewSwipeHelper.UnderlayButtonClickListener() { | |
| @Override | |
| public void onClick(int pos) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| repositories { | |
| jcenter() | |
| google() | |
| maven { url "https://github.com/ChangYow/CYLogUtils/raw/master" } | |
| maven { url "https://github.com/ChangYow/CYSerialCommLib/raw/master" } | |
| maven { url "https://github.com/ChangYow/CYEchelonLib/raw/master" } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Check if an argument was supplied | |
| if [ -z "$1" ] | |
| then | |
| echo "No argument supplied, please provide video name" | |
| else | |
| # start recording | |
| adb shell screenrecord --bit-rate 6000000 /sdcard/$1.mp4 & | |
| # Get its PID | |
| PID=$! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function androidScreenshot | |
| { | |
| # only do this if there is a device connected | |
| adb shell exit 2>/dev/null | |
| if [[ $? == 0 ]]; then | |
| # Example filename: ~/Desktop/Android Screen 2013-09-11 12.32.16 PM.png | |
| # perl line ending hacks from http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html | |
| dateString=`date +"%Y-%m-%d at %I.%M.%S %p"` | |
| fileName="Android Screen $dateString.png" | |
| adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/Desktop/$fileName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo "Press Ctrl + C to stop recording" | |
| PREFIX="Screenshot-$(date +%Y%m%d-%H%M%S)" | |
| BASE="/sdcard/$PREFIX" | |
| DELAY=300 | |
| trap ctrl_c INT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Repeatedly records Android screen capture to files 180 seconds in length | |
| # until Ctrl+C, then pulls those files to the desktop, merges them into | |
| # one video, generates an additional 8x speed version (*-8x.mp4) and cleans | |
| # up the intermediary files. | |
| # Depends on: ffmpeg, adb | |
| # Usage: $ adb-record <name> # => ./name.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # How to install: | |
| # exo-open "http://developer.android.com/sdk/index.html#Other" | |
| # sudo apt-get install libav-tools imagemagick | |
| # wget https://gist.githubusercontent.com/lorenzos/e8a97c1992cddf9c1142/raw/android-screen-to-gif.sh | |
| # chmod a+x android-screen-to-gif.sh | |
| # Help message | |
| function usage() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Uncrustify 0.60 | |
| # | |
| # General options | |
| # | |
| # The type of line endings | |
| newlines = auto # auto/lf/crlf/cr | |
| # The original size of tabs in the input |