ContractFragment$2.smali

.class Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment$2;
.super Ljava/lang/Object;
.source "ContractFragment.java"

# interfaces
.implements Ltr/com/hurriyet/androidsdk/callback/ContractCallback;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->initViews(Landroid/view/View;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;


# direct methods
.method constructor <init>(Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;)V
    .registers 2

    .line 92
    iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment$2;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onFailure(Ltr/com/hurriyet/androidsdk/model/ErrorResponse;)V
    .registers 4

    .line 104
    iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment$2;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;

    # getter for: Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->loadingView:Lhurriyet/mobil/android/hurriyet/views/HurriyetLoadingView;
    invoke-static {v0}, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->access$000(Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;)Lhurriyet/mobil/android/hurriyet/views/HurriyetLoadingView;

    move-result-object v0

    invoke-virtual {v0}, Lhurriyet/mobil/android/hurriyet/views/HurriyetLoadingView;->hide()V

    .line 105
    iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment$2;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;

    invoke-virtual {v0}, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->getContext()Landroid/content/Context;

    move-result-object v0

    if-eqz v0, :cond_23

    .line 106
    iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment$2;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;

    invoke-virtual {v0}, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {p1}, Ltr/com/hurriyet/androidsdk/model/ErrorResponse;->getMessage()Ljava/lang/String;

    move-result-object p1

    const/4 v1, 0x0

    invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    :cond_23
    return-void
.end method

.method public onSuccess(Ltr/com/hurriyet/androidsdk/response/contract/ContractResponse;)V
    .registers 5

    .line 95
    iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment$2;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;

    # getter for: Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->loadingView:Lhurriyet/mobil/android/hurriyet/views/HurriyetLoadingView;
    invoke-static {v0}, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->access$000(Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;)Lhurriyet/mobil/android/hurriyet/views/HurriyetLoadingView;

    move-result-object v0

    invoke-virtual {v0}, Lhurriyet/mobil/android/hurriyet/views/HurriyetLoadingView;->hide()V

    if-eqz p1, :cond_32

    .line 97
    iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment$2;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;

    # getter for: Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->textViewContent:Landroid/widget/TextView;
    invoke-static {v0}, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->access$100(Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;)Landroid/widget/TextView;

    move-result-object v0

    invoke-virtual {p1}, Ltr/com/hurriyet/androidsdk/response/contract/ContractResponse;->getText()Ljava/lang/String;

    move-result-object p1

    const-string v1, "\\n"

    const-string v2, "\n"

    invoke-virtual {p1, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p1

    const-string v1, "\\"

    const-string v2, ""

    invoke-virtual {p1, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 98
    iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment$2;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;

    # getter for: Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->textViewContent:Landroid/widget/TextView;
    invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;->access$100(Lhurriyet/mobil/android/hurriyet/fragments/ContractFragment;)Landroid/widget/TextView;

    move-result-object p1

    const/4 v0, 0x0

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setVisibility(I)V

    :cond_32
    return-void
.end method