Skip to content

Instantly share code, notes, and snippets.

View mindwing's full-sized avatar
:octocat:

Jase HA mindwing

:octocat:
View GitHub Profile
@mindwing
mindwing / RequestResponseTest.java
Created June 8, 2016 05:28
Agera Explained - 08.Incrementally Agerifying legacy code
interface AsyncOperator<P, R> {
Cancellable request(P param, Callback<R> callback);
}
interface Callback<R> {
void onResponse(R response); // Can be called from any thread
}
interface Cancellable {
void cancel();
@mindwing
mindwing / AsyncOperatorRepository.java
Created June 8, 2016 05:29
Agera Explained - 08.Incrementally Agerifying legacy code
public class AsyncOperatorRepository<P, R> extends BaseObservable
implements Repository<Result<R>>, Callback<R> {
private final AsyncOperator<P, R> asyncOperator;
private final Supplier<P> paramSupplier;
private Result<R> result;
private Cancellable cancellable;
public AsyncOperatorRepository(AsyncOperator<P, R> asyncOperator,
@mindwing
mindwing / AsyncOperatorRepository.java
Created June 8, 2016 05:31
Agera Explained - 08.Incrementally Agerifying legacy code
public class AsyncOperatorRepository<P, R> extends BaseObservable
implements Repository<Result<R>>, Callback<R>, Updatable {
private final AsyncOperator<P, R> asyncOperator;
private final Repository<P> paramRepository;
private Result<R> result;
private Cancellable cancellable;
public AsyncOperatorRepository(AsyncOperator<P, R> asyncOperator,
@mindwing
mindwing / activity_main.xml
Created August 6, 2016 07:40
Fast campus 안드로이드 앱 개발 프로젝트 HelloWorld 예제
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="kr.mindwing.helloworld.MainActivity">
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
@mindwing
mindwing / EachDirectoryPath.md
Created January 1, 2018 13:54 — forked from granoeste/EachDirectoryPath.md
[Android] How to get the each directory path.

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories