Skip to content

Instantly share code, notes, and snippets.

View importre's full-sized avatar
🍼

Jaewe Heo importre

🍼
View GitHub Profile
@importre
importre / doublearray.go
Created October 12, 2013 15:08
how to turn char ** into []string in Go
package main
import (
"errors"
"fmt"
"log"
"reflect"
"unsafe"
)
@importre
importre / install_apk.bat
Last active December 30, 2015 02:59
apk installer for devices connected to your machine with GUI
python %~dp0\\install_apk.py %1
buildscript {
// android 빌드를 하기위해 플러그인 자체을 가져오기 위한 설정입니다.
repositories {
mavenCentral()
}
// plugin 자체는 maven 중앙 저장소를 통해 배포됩니다.( http://search.maven.org/ )
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
// android plugin 버전 0.6.+ 를 사용합니다. 배포된 버전중 +로 표시된 부분의 숫자가 가장 큰 버전이 사용됩니다.
@importre
importre / build.gradle
Created December 23, 2013 04:03
build.gradle for robolectric
buildscript {
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'

준비물

aosp 소스코드 & 이걸 eng 또는 userdebug 모드로 빌드한 이미지가 flash 된 넥서스 단말(jdb 만 있어도 될것 같긴한데 아직 해보지는 않았음)

aosp 빌드환경을 갖추고 싶다? 여기로!!

이클립스 세팅

빌드된 aosp 코드와 이클립스를 연결해놔야 됨. 여기 참고

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
# Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4
# See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks
# And here: http://forums.macrumors.com/showthread.php?t=1410459
@importre
importre / AndroidManifest.xml
Created October 22, 2014 10:39
Toolbar Animation with Navigation Drawer
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sample.myapplication" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity

This class provides a simple animator which applies a slide in/out from/to the left animation to item views in the RecyclerView

This code is cloned from DefaultItemAnimator provided by Google, customizing the part highlighted as "Custom implementation".

Example:

   mRecyclerView.setItemAnimator(new SlideInOutLeftDefaultItemAnimator(mRecyclerView));
@importre
importre / colors.xml
Last active August 29, 2015 14:19 — forked from mpost/colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="action_pause">#FF8F00</color>
<color name="action_resume">#43A047</color>
</resources>