mirror of
https://github.com/WuXiaolong/AndroidMVPSample.git
synced 2025-06-07 22:04:04 +08:00
change method name
This commit is contained in:
parent
4aa23833a6
commit
ee27e46190
@ -17,7 +17,7 @@ public class MainPresenter extends BasePresenter<MainView> {
|
|||||||
|
|
||||||
public void loadDataByRetrofitRxjava(String cityId) {
|
public void loadDataByRetrofitRxjava(String cityId) {
|
||||||
mvpView.showLoading();
|
mvpView.showLoading();
|
||||||
addSubscription(apiStores.loadDataByRetrofitRxjava(cityId),
|
addSubscription(apiStores.loadDataByRetrofitRxJava(cityId),
|
||||||
new ApiCallback<MainModel>() {
|
new ApiCallback<MainModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(MainModel model) {
|
public void onSuccess(MainModel model) {
|
||||||
|
@ -23,5 +23,5 @@ public interface ApiStores {
|
|||||||
|
|
||||||
//加载天气
|
//加载天气
|
||||||
@GET("adat/sk/{cityId}.html")
|
@GET("adat/sk/{cityId}.html")
|
||||||
Observable<MainModel> loadDataByRetrofitRxjava(@Path("cityId") String cityId);
|
Observable<MainModel> loadDataByRetrofitRxJava(@Path("cityId") String cityId);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@ import com.wuxiaolong.androidmvpsample.retrofit.ApiCallback;
|
|||||||
import com.wuxiaolong.androidmvpsample.retrofit.RetrofitCallback;
|
import com.wuxiaolong.androidmvpsample.retrofit.RetrofitCallback;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
|
|
||||||
@ -102,7 +101,7 @@ public class MainActivity extends MvpActivity<MainPresenter> implements MainView
|
|||||||
private void loadDataByRetrofitRxJava() {
|
private void loadDataByRetrofitRxJava() {
|
||||||
showProgressDialog();
|
showProgressDialog();
|
||||||
addSubscription(
|
addSubscription(
|
||||||
apiStores().loadDataByRetrofitRxjava("101220602"),
|
apiStores().loadDataByRetrofitRxJava("101220602"),
|
||||||
new ApiCallback<MainModel>() {
|
new ApiCallback<MainModel>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user