Skip to content

Instantly share code, notes, and snippets.

View wooooooak's full-sized avatar

LEE YONGJUN wooooooak

  • kakaomobility
  • South Korea
View GitHub Profile
@mirmilad
mirmilad / debounce.kt
Last active June 21, 2023 22:46
Simple debounce extension for LiveData by using Coroutines
import androidx.lifecycle.LiveData
import androidx.lifecycle.MediatorLiveData
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
fun <T> LiveData<T>.debounce(duration: Long = 1000L, coroutineScope: CoroutineScope) = MediatorLiveData<T>().also { mld ->
val source = this
@gwillz
gwillz / draft-js-plugins.d.ts
Created July 5, 2018 08:53
Naive TypeScript support for draft-js-plugins
/// <resources type="react" />
/// <resources type="draft-js" />
declare module "draft-js-plugins-editor" {
export type PluginsEditorProps = Draft.EditorProps | {
plugins: any,
}
export default class PluginsEditor
extends React.Component<PluginsEditorProps, Draft.EditorState> {}
@dalinaum
dalinaum / android-build.md
Last active June 1, 2021 13:02
안드로이드 빌드 시스템

안드로이드 빌드 시스템

자바 세계의 빌드 시스템은 시기에 맞추어 다른 도구가 주목을 받았습니다. 처음에는 확장성이 강력한 아파치 앤트, Apache Ant가 주목을 받았습니다. 설정이 편하고 중앙 저장소를 가진 아파치 메이븐, Apache Maven이 다음 타자였습니다. 사람들은 강력하지만 설정하기 어려운 앤트와 편리하지만 커스터마이징하기 어려운 메이븐 사이에서 아쉬움을 느꼈고 절충된 해법을 찾기를 원했습니다. 아파치는 2004년 대안으로 아파치 아이비, Apache Ivy를 선보였으나 시장의 반응은 좋지 않았습니다. 그 후로 3년 뒤 우리는 그래들, Gradle을 만나게 됩니다. 그래들은 그루비 언어를 기반으로 쉽게 설정할 수 있으며 다양한 기능을 추가할 수 있었고 자바 세상의 주류로 편입하게 됩니다.

안드로이드가 처음 등장했을 때 안드로이드의 주요 빌드 시스템은 아파치 앤트였습니다. 이 당시에는 IDE 환경도 안드로이드 스튜디오를 쓰는 지금과는 달리 이클립스 기반의 안드로이드 개발 툴, Android Development Tool을 사용했습니다. 이후 자바 세계의 변화에 맞추어서 안드로이드 빌드에서 메이븐을 여러 안드로이드 커뮤니티에서 실험하기 시작했고 나중에 구글이 공식 빌드 시스템을 그래들 기반으로 변경하였습니다.

기본 빌드 시스템의 파일 구성

일반적인 안드로이드 빌드 구성

@orhanobut
orhanobut / gist:8665372
Created January 28, 2014 10:34
Up down animation for dialog fragment
// Slide up animation
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:fromYDelta="100%"
android:interpolator="@android:anim/accelerate_interpolator"
android:toXDelta="0" />