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 downloadFile(String downloadPath) { | |
RetrofitUtils.getWebServices().downloadFile(downloadPath) | |
.subscribeOn(Schedulers.io()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.map(new Function<ResponseBody, File>() { | |
@Override | |
public File apply(ResponseBody responseBody) { | |
File file = new File(""); | |
writeResponseBodyToDisk(responseBody,file ); | |
return file; |
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 abstract class BaseRecyclerViewAdapter<T extends BaseRecyclerViewAdapter.BaseHolder, X> | |
extends RecyclerView.Adapter<T> { | |
private RecyclerViewListener recyclerViewListener; | |
private List<X> data; | |
public BaseRecyclerViewAdapter(List<X> data) { | |
this.data = data; | |
} |
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 abstract class RxAsyncTask<T> implements LifecycleObserver { | |
private Disposable disposable; | |
private Lifecycle lifecycleOwner; | |
private Lifecycle.State event = Lifecycle.State.DESTROYED; | |
public abstract Observable<T> doInBackGround(); | |
public void onPreExecute() { | |
} |
NewerOlder