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
.retryWhen(new Func1<Observable<? extends Throwable>, Observable<?>>() { | |
@Override | |
public Observable<?> call(final Observable<? extends Throwable> errors) { | |
return errors.flatMap(new Func1<Throwable, Observable<?>>() { | |
@Override | |
public Observable<?> call(Throwable throwable) { | |
if(throwable instanceof SocketTimeoutException) { | |
Logger.e("UpdateTask retry after 3 sec: "); | |
return Observable.timer(3, TimeUnit.SECONDS); |
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 Test { | |
public static int i =1 ; | |
public int j = 2; | |
public static class TT extends Test{ | |
public static int i =3 ; | |
public int j = 4; | |
public TT() { |
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
.retryWhen(new Func1<Observable<? extends Throwable>, Observable<?>>() { | |
@Override | |
public Observable<?> call(Observable<? extends Throwable> errors) { | |
int retryTime = 2; | |
return errors.flatMap(new Func1<Throwable, Observable<?>>() { | |
@Override | |
public Observable<?> call(Throwable throwable) { |
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
Parent Fragment: | |
dialogFrag = createDialog() | |
dialogFrag.setTargetFragment(this) | |
dialogFrag.show() | |
... | |
setDate(date){ | |
date // From Dialog.. |
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
CustomAdapter: | |
//Avoid others to set your arraylist from outside | |
private final list = new arrayList | |
//Allow outside to add articles.. | |
public void add(Article... article){ | |
put articles into list | |
notify data changed | |
} |
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
~/Documents/APP/week3_tweet_codepath/app/src/main/java/com/codepath/apps/mysimpletweet/models master ●✚ cat StringCallback.java | |
package com.codepath.apps.mysimpletweet.models; | |
/** | |
* Created by i_enpinghsieh on 2017/2/26. | |
*/ | |
public class StringCallback implements Callbacks<String> { |
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
interface OnComposed{ | |
void onSuccess(Tweet tweet) | |
} | |
TimeLineActivity: | |
TimeLineActivity implement OnComposed{ | |
... | |
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
As a user, I want search all people's information I added so that I can recall people I met. | |
As a user, I want view these information anytime even network is down. | |
As a user, I want view multiple information at same time. | |
As a user, I want choose multiple attrs to sort the order of info so that I can have higher posibility to find the right one. | |
As a user, I want view his/her attrs. | |
As a user, I want add specific person information so that I can recall he/she if we meet accidently. | |
As a user, I want input his/her name at first place so that I can call their name when I met. | |
As a user, I want input by type name. | |
As a user, I want take a photo for mate card. | |
As a user, I want add his/her appearance attrs privately so that I can search them. |
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
@Override | |
public void setContentView(@LayoutRes int layoutResID) { | |
if (R.layout.activity_base == layoutResID) { | |
super.setContentView(R.layout.activity_base); | |
contentView = (RelativeLayout) findViewById(R.id.main_container); | |
contentView.removeAllViews(); | |
toolbar = (Toolbar) findViewById(R.id.tool_bar); | |
setSupportActionBar(toolbar); |
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
<!-- Upside down Android --> | |
<img width="50" height="26" align="top" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAaCAMAAADCHv/YAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAitQTFRFn8ctpMo4o8o3ocgzo8k3osk1oMcvo8k2osk0pco6+fzy7vXa9/rs8/jl/P75/v78/v/9osk2ocgy+Pvwo8o4/v79pss68ffho8k1/f77s9JY2umtqMxB/f76stJWvdhtrM5J6vPRpss7oskzpMo3nscs9fnoq85I7/bcp8w+0eOY2+qvstJV+vz08Pbd5e/E5O/En8crnsYrrtBNoMcutNNardBMpss80eSaoMgu5e/Focg08fffz+SYpcs6x96EsNFR5fDFxd2AuNVju9do9PjlzOGOoccvyuCL0OSYpco5ocky7/Xbwtt4zuKT8vfhr9BO8vjjpss+qc5F1eah4O273+y5qs1E0OOWt9Vks9NYqs1Crc9KxNx8oMgx3OqxocgwttRewdt36vPSu9dqqcxB9PnoncYos9JXv9lxqs1FqMxAuNZjsNFTn8cvosgz2eiq5vDI5/DJ/P35ttVg2Omp7vXZ7fTXnscrnsYqstJYuNRg+fvytNRc6PHL///94O26tdNb9Pjnn8csz+OWqs5Fosgx6PLNq85F1eajrM5I///+rc9Lt9Vgt9Rf/P344e29nMUo3uy1ttRgrs9MpMo6wdt2+vzzy+GN+Pvu+/32ockzqs1D3Ouy4e69rM9J8/jk8ffgzeKRq81Fqc1E1OWfxdx+nsct2+mw2emr9vrsxNx9yd+I0uafoMgw5O/CsdJW7PTT6/PS3Oqyn8cuocgxqs5HpMo5////jSIuSwAAAd9JREFUeNqE0vdb00AYB/BLmrShLaWLvTfIHrIEAREBwQkq0w0OkL1kCAoqICpbFPdEUUGakPfP |
OlderNewer