Owen Carpenter
02/01/2019, 2:29 AMprivate fun postData(resource: String, request: Model.Request, view: ImageButton){
view.setPressed(true)
disposable = apiService.postData(resource, request)
.subscribeOn(<http://Schedulers.io|Schedulers.io>())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(
{ r -> view.setPressed(false)
toast("Success")},
{ e -> toast("Error")}
)
}
Murtaza Hussain
02/03/2019, 6:22 AMpressed
and touched is are two different things, if you want to programmatically call press the button call view.performClick