433 lines
11 KiB
Smali
433 lines
11 KiB
Smali
.class public abstract Lcom/moji/mvpframe/MVPActivity;
|
|
.super Lcom/moji/base/MJActivity;
|
|
.source "MVPActivity.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/moji/mvpframe/IMJMvpView;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<P:",
|
|
"Lcom/moji/mvpframe/BasePresenter;",
|
|
">",
|
|
"Lcom/moji/base/MJActivity;",
|
|
"Lcom/moji/mvpframe/IMJMvpView;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private a:Lcom/moji/mvpframe/BasePresenter;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"TP;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 21
|
|
invoke-direct {p0}, Lcom/moji/base/MJActivity;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a()V
|
|
.locals 2
|
|
|
|
.line 52
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->a:Lcom/moji/mvpframe/BasePresenter;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 53
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "mPresenter can nor be null,please init it in instancePresenter method"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected abstract d()Lcom/moji/mvpframe/BasePresenter;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TP;"
|
|
}
|
|
.end annotation
|
|
.end method
|
|
|
|
.method public dealRequestError(Lcom/moji/requestcore/MJException;)V
|
|
.locals 1
|
|
.annotation build Landroid/support/annotation/CallSuper;
|
|
.end annotation
|
|
|
|
.line 164
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 165
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->dealRequestError(Lcom/moji/requestcore/MJException;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public dealResponseResult(Lcom/moji/requestcore/entity/IResult;Z)V
|
|
.locals 0
|
|
.annotation build Landroid/support/annotation/CallSuper;
|
|
.end annotation
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 174
|
|
invoke-virtual {p1}, Lcom/moji/requestcore/entity/IResult;->b()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/ToastTool;->a(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public getMJContext()Landroid/content/Context;
|
|
.locals 0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public hideLoading()V
|
|
.locals 1
|
|
|
|
.line 84
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 85
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->hideLoading()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public hideLoading(Lcom/moji/mvpframe/delegate/ILoadingCallback;)V
|
|
.locals 1
|
|
|
|
.line 117
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 118
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->hideLoading(Lcom/moji/mvpframe/delegate/ILoadingCallback;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method protected abstract j()Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
.end method
|
|
|
|
.method protected m()Lcom/moji/mvpframe/BasePresenter;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TP;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 58
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->a:Lcom/moji/mvpframe/BasePresenter;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected n()Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
.locals 1
|
|
|
|
.line 184
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected onCreate(Landroid/os/Bundle;)V
|
|
.locals 1
|
|
|
|
.line 34
|
|
invoke-virtual {p0}, Lcom/moji/mvpframe/MVPActivity;->d()Lcom/moji/mvpframe/BasePresenter;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->a:Lcom/moji/mvpframe/BasePresenter;
|
|
|
|
.line 35
|
|
invoke-direct {p0}, Lcom/moji/mvpframe/MVPActivity;->a()V
|
|
|
|
.line 36
|
|
invoke-super {p0, p1}, Lcom/moji/base/MJActivity;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
.line 37
|
|
invoke-virtual {p0}, Lcom/moji/mvpframe/MVPActivity;->j()Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onDestroy()V
|
|
.locals 2
|
|
|
|
.line 74
|
|
invoke-super {p0}, Lcom/moji/base/MJActivity;->onDestroy()V
|
|
|
|
.line 75
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->a:Lcom/moji/mvpframe/BasePresenter;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mvpframe/BasePresenter;->c()V
|
|
|
|
.line 76
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 77
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->d()V
|
|
|
|
:cond_0
|
|
const-string v0, "MJMVPActivity"
|
|
|
|
const-string v1, "onDestroy"
|
|
|
|
.line 79
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onStop()V
|
|
.locals 2
|
|
|
|
.line 63
|
|
invoke-super {p0}, Lcom/moji/base/MJActivity;->onStop()V
|
|
|
|
.line 64
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->a:Lcom/moji/mvpframe/BasePresenter;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mvpframe/BasePresenter;->m()V
|
|
|
|
.line 65
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 66
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->c()V
|
|
|
|
:cond_0
|
|
const-string v0, "MJMVPActivity"
|
|
|
|
const-string v1, "onStop"
|
|
|
|
.line 69
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public showEmptyView(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 145
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 146
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showEmptyView(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showEmptyView(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 131
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 132
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showEmptyView(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showErrorView(I)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 152
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 153
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showErrorView(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showErrorView(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 138
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 139
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showErrorView(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading()V
|
|
.locals 1
|
|
|
|
.line 124
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 125
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showLoading()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading(IJ)V
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 105
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 106
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showLoading(IJ)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading(J)V
|
|
.locals 2
|
|
|
|
.line 112
|
|
invoke-virtual {p0}, Lcom/moji/mvpframe/MVPActivity;->getMJContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
sget v1, Lcom/moji/base/R$string;->loading:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0, p1, p2}, Lcom/moji/mvpframe/MVPActivity;->showLoading(Ljava/lang/String;J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 91
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 92
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showLoading(Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public showLoading(Ljava/lang/String;J)V
|
|
.locals 1
|
|
|
|
.line 98
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 99
|
|
iget-object v0, p0, Lcom/moji/mvpframe/MVPActivity;->b:Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lcom/moji/mvpframe/delegate/AbsStatusViewDelegate;->showLoading(Ljava/lang/String;J)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|