This file contains 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
apply plugin: 'com.jakewharton.butterknife' | |
dependencies { | |
compile 'com.jakewharton:butterknife:8.4.0' | |
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0' | |
} |
This file contains 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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0' | |
} | |
} |
This file contains 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
<family lang="ko"> | |
<font weight="400" style="normal" index="1">NotoSansCJK-Regular.ttc</font> | |
</family> | |
+ <family lang="ko"> | |
+ <font weight="400" style="normal" index="1">NanumGothic.ttf</font> | |
+ </family> | |
<family lang="und-Zsye"> | |
<font weight="400" style="normal">NotoColorEmoji.ttf</font> | |
</family> |
This file contains 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
public class log { | |
public static final String tag = "PYEONGHO"; | |
public final static boolean debug = BuildConfig.DEBUG; | |
public final static boolean debug1 = true; | |
private static boolean getDebug(){ | |
if(debug && debug1){ | |
return true; |
This file contains 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
private class mWebViewClient extends WebViewClient { | |
@Override | |
public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error){ | |
StringBuilder sb= new StringBuilder(); | |
if (error != null) { | |
switch (error.getPrimaryError()) { | |
case SslError.SSL_EXPIRED: | |
sb.append("이 사이트의 보안 인증서가 만료되었습니다.\n"); | |
break; | |
case SslError.SSL_IDMISMATCH: |
This file contains 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
PackageManager pm = getPackageManager(); | |
try { | |
PackageInfo pi = pm.getPackageInfo("com.google.android.webview", 0); | |
Log.d("UILAb", "version name: " + pi.versionName); | |
Log.d("UILAb", "version code: " + pi.versionCode); | |
} catch (PackageManager.NameNotFoundException e) { | |
} |
This file contains 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
private List<Recent> items= null; | |
private ArrayList<Recent> arrayList; | |
public RecyclerAdapter(Context context, List<Recent> items) { | |
this.mCtx=context; | |
this.items=items; | |
arrayList = new ArrayList<Recent>(); | |
arrayList.addAll(items); | |
} |
This file contains 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
private void doSomeWork() { | |
getObservable() | |
// Run on a background thread | |
.subscribeOn(Schedulers.io()) | |
// Be notified on the main thread | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe(getObserver()); | |
} | |
private Observable<String> getObservable() { |
This file contains 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
private Observable<List<ApiUser>> getObservable() { | |
return Observable.create(new ObservableOnSubscribe<List<ApiUser>>() { | |
@Override | |
public void subscribe(ObservableEmitter<List<ApiUser>> e) throws Exception { | |
if (!e.isDisposed()) { | |
e.onNext(Utils.getApiUserList()); | |
e.onComplete(); | |
} | |
} | |
}); |
This file contains 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
public class AppClient { | |
public static Retrofit mRetrofit; | |
public static Retrofit retrofit() { | |
if (mRetrofit == null) { | |
OkHttpClient.Builder builder = new OkHttpClient.Builder(); | |
if (BuildConfig.DEBUG) { | |
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); | |
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); |
OlderNewer