.class public Lcom/moji/forum/ui/MojiFragmentTabHost;
.super Landroid/widget/TabHost;
.source "MojiFragmentTabHost.java"

# interfaces
.implements Landroid/widget/TabHost$OnTabChangeListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/forum/ui/MojiFragmentTabHost$SavedState;,
        Lcom/moji/forum/ui/MojiFragmentTabHost$DummyTabFactory;,
        Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;
    }
.end annotation


# instance fields
.field private final a:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;",
            ">;"
        }
    .end annotation
.end field

.field private b:Landroid/widget/FrameLayout;

.field private c:Landroid/content/Context;

.field private d:Landroid/support/v4/app/FragmentManager;

.field private e:I

.field private f:Landroid/widget/TabHost$OnTabChangeListener;

.field private g:Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

.field private h:Z

.field private i:F

.field private j:I

.field private k:Landroid/view/animation/Animation;

.field private l:Landroid/view/animation/Animation;

.field private m:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    const/4 v0, 0x0

    .line 147
    invoke-direct {p0, p1, v0}, Landroid/widget/TabHost;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 64
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    iput-object v1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->a:Ljava/util/ArrayList;

    const/4 v1, 0x0

    .line 72
    iput v1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->i:F

    const/4 v1, 0x0

    .line 76
    iput-boolean v1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->m:Z

    .line 148
    invoke-direct {p0, p1, v0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    .line 152
    invoke-direct {p0, p1, p2}, Landroid/widget/TabHost;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 64
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->a:Ljava/util/ArrayList;

    const/4 v0, 0x0

    .line 72
    iput v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->i:F

    const/4 v0, 0x0

    .line 76
    iput-boolean v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->m:Z

    .line 153
    invoke-direct {p0, p1, p2}, Lcom/moji/forum/ui/MojiFragmentTabHost;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method private a(Ljava/lang/String;Landroid/support/v4/app/FragmentTransaction;)Landroid/support/v4/app/FragmentTransaction;
    .locals 4

    if-eqz p1, :cond_6

    const/4 v0, 0x0

    .line 370
    iget-object v1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_0
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    .line 371
    invoke-static {v2}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->b(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    move-object v0, v2

    goto :goto_0

    :cond_1
    if-eqz v0, :cond_6

    .line 375
    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->g:Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    if-eq p1, v0, :cond_6

    if-nez p2, :cond_2

    .line 377
    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->d:Landroid/support/v4/app/FragmentManager;

    invoke-virtual {p1}, Landroid/support/v4/app/FragmentManager;->beginTransaction()Landroid/support/v4/app/FragmentTransaction;

    move-result-object p2

    .line 379
    :cond_2
    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->g:Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    if-eqz p1, :cond_3

    .line 380
    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->g:Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    invoke-static {p1}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object p1

    if-eqz p1, :cond_3

    .line 382
    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->g:Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    invoke-static {p1}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object p1

    invoke-virtual {p2, p1}, Landroid/support/v4/app/FragmentTransaction;->hide(Landroid/support/v4/app/Fragment;)Landroid/support/v4/app/FragmentTransaction;

    :cond_3
    if-eqz v0, :cond_5

    .line 386
    invoke-static {v0}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object p1

    if-nez p1, :cond_4

    .line 387
    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->c:Landroid/content/Context;

    invoke-static {v0}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->c(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Ljava/lang/Class;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->d(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/os/Bundle;

    move-result-object v2

    invoke-static {p1, v1, v2}, Landroid/support/v4/app/Fragment;->instantiate(Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;)Landroid/support/v4/app/Fragment;

    move-result-object p1

    invoke-static {v0, p1}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;Landroid/support/v4/app/Fragment;)Landroid/support/v4/app/Fragment;

    .line 388
    iget p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->e:I

    invoke-static {v0}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object v1

    invoke-static {v0}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->b(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p2, p1, v1, v2}, Landroid/support/v4/app/FragmentTransaction;->add(ILandroid/support/v4/app/Fragment;Ljava/lang/String;)Landroid/support/v4/app/FragmentTransaction;

    goto :goto_1

    .line 391
    :cond_4
    invoke-static {v0}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object p1

    invoke-virtual {p2, p1}, Landroid/support/v4/app/FragmentTransaction;->show(Landroid/support/v4/app/Fragment;)Landroid/support/v4/app/FragmentTransaction;

    .line 395
    :cond_5
    :goto_1
    iput-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->g:Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    :cond_6
    return-object p2
.end method

.method private a()V
    .locals 6

    .line 166
    new-instance v0, Landroid/view/animation/TranslateAnimation;

    iget v1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->j:I

    int-to-float v1, v1

    const/4 v2, 0x0

    invoke-direct {v0, v2, v2, v2, v1}, Landroid/view/animation/TranslateAnimation;-><init>(FFFF)V

    iput-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->k:Landroid/view/animation/Animation;

    .line 167
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->k:Landroid/view/animation/Animation;

    const-wide/16 v3, 0xc8

    invoke-virtual {v0, v3, v4}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 168
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->k:Landroid/view/animation/Animation;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setFillAfter(Z)V

    .line 170
    new-instance v0, Landroid/view/animation/TranslateAnimation;

    iget v5, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->j:I

    int-to-float v5, v5

    invoke-direct {v0, v2, v2, v5, v2}, Landroid/view/animation/TranslateAnimation;-><init>(FFFF)V

    iput-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->l:Landroid/view/animation/Animation;

    .line 171
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->l:Landroid/view/animation/Animation;

    invoke-virtual {v0, v3, v4}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 172
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->l:Landroid/view/animation/Animation;

    invoke-virtual {v0, v1}, Landroid/view/animation/Animation;->setFillAfter(Z)V

    return-void
.end method

.method private a(Landroid/content/Context;)V
    .locals 7

    const v0, 0x1020013

    .line 179
    invoke-virtual {p0, v0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->findViewById(I)Landroid/view/View;

    move-result-object v1

    if-nez v1, :cond_0

    .line 180
    new-instance v1, Landroid/widget/LinearLayout;

    invoke-direct {v1, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    const/4 v2, 0x1

    .line 181
    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 182
    new-instance v2, Landroid/widget/FrameLayout$LayoutParams;

    const/4 v3, -0x1

    invoke-direct {v2, v3, v3}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    invoke-virtual {p0, v1, v2}, Lcom/moji/forum/ui/MojiFragmentTabHost;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 186
    new-instance v2, Landroid/widget/TabWidget;

    invoke-direct {v2, p1}, Landroid/widget/TabWidget;-><init>(Landroid/content/Context;)V

    .line 187
    invoke-virtual {v2, v0}, Landroid/widget/TabWidget;->setId(I)V

    const/4 v0, 0x0

    .line 188
    invoke-virtual {v2, v0}, Landroid/widget/TabWidget;->setOrientation(I)V

    .line 189
    new-instance v4, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v5, -0x2

    const/4 v6, 0x0

    invoke-direct {v4, v3, v5, v6}, Landroid/widget/LinearLayout$LayoutParams;-><init>(IIF)V

    invoke-virtual {v1, v2, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 193
    new-instance v2, Landroid/widget/FrameLayout;

    invoke-direct {v2, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    const v4, 0x1020011

    .line 194
    invoke-virtual {v2, v4}, Landroid/widget/FrameLayout;->setId(I)V

    .line 195
    new-instance v4, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v4, v0, v0, v6}, Landroid/widget/LinearLayout$LayoutParams;-><init>(IIF)V

    invoke-virtual {v1, v2, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 197
    new-instance v2, Landroid/widget/FrameLayout;

    invoke-direct {v2, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->b:Landroid/widget/FrameLayout;

    .line 198
    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->b:Landroid/widget/FrameLayout;

    iget v4, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->e:I

    invoke-virtual {p1, v4}, Landroid/widget/FrameLayout;->setId(I)V

    .line 199
    new-instance p1, Landroid/widget/LinearLayout$LayoutParams;

    const/high16 v4, 0x3f800000    # 1.0f

    invoke-direct {p1, v3, v0, v4}, Landroid/widget/LinearLayout$LayoutParams;-><init>(IIF)V

    invoke-virtual {v1, v2, p1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    :cond_0
    return-void
.end method

.method private a(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 3

    const/4 v0, 0x1

    .line 157
    new-array v0, v0, [I

    const/4 v1, 0x0

    const v2, 0x10100f3

    aput v2, v0, v1

    invoke-virtual {p1, p2, v0, v1, v1}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;

    move-result-object p1

    .line 159
    invoke-virtual {p1, v1, v1}, Landroid/content/res/TypedArray;->getResourceId(II)I

    move-result p2

    iput p2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->e:I

    .line 160
    invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V

    .line 162
    invoke-super {p0, p0}, Landroid/widget/TabHost;->setOnTabChangedListener(Landroid/widget/TabHost$OnTabChangeListener;)V

    return-void
.end method

.method private a(Landroid/support/v4/app/FragmentTransaction;)V
    .locals 0

    .line 324
    invoke-virtual {p1}, Landroid/support/v4/app/FragmentTransaction;->commitAllowingStateLoss()I

    return-void
.end method

.method private b()V
    .locals 3

    .line 241
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->b:Landroid/widget/FrameLayout;

    if-nez v0, :cond_1

    .line 242
    iget v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->e:I

    invoke-virtual {p0, v0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/FrameLayout;

    iput-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->b:Landroid/widget/FrameLayout;

    .line 243
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->b:Landroid/widget/FrameLayout;

    if-eqz v0, :cond_0

    goto :goto_0

    .line 244
    :cond_0
    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "No tab content FrameLayout found for id "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->e:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_1
    :goto_0
    return-void
.end method


# virtual methods
.method public a(Landroid/content/Context;Landroid/support/v4/app/FragmentManager;I)V
    .locals 0

    .line 225
    invoke-direct {p0, p1}, Lcom/moji/forum/ui/MojiFragmentTabHost;->a(Landroid/content/Context;)V

    .line 226
    invoke-super {p0}, Landroid/widget/TabHost;->setup()V

    .line 227
    iput-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->c:Landroid/content/Context;

    .line 228
    iput-object p2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->d:Landroid/support/v4/app/FragmentManager;

    .line 229
    iput p3, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->e:I

    .line 230
    invoke-direct {p0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->b()V

    .line 231
    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->b:Landroid/widget/FrameLayout;

    invoke-virtual {p1, p3}, Landroid/widget/FrameLayout;->setId(I)V

    .line 235
    invoke-virtual {p0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->getId()I

    move-result p1

    const/4 p2, -0x1

    if-ne p1, p2, :cond_0

    const p1, 0x1020012

    .line 236
    invoke-virtual {p0, p1}, Lcom/moji/forum/ui/MojiFragmentTabHost;->setId(I)V

    :cond_0
    return-void
.end method

.method public a(Landroid/widget/TabHost$TabSpec;Ljava/lang/Class;Landroid/os/Bundle;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/TabHost$TabSpec;",
            "Ljava/lang/Class<",
            "*>;",
            "Landroid/os/Bundle;",
            ")V"
        }
    .end annotation

    .line 261
    new-instance v0, Lcom/moji/forum/ui/MojiFragmentTabHost$DummyTabFactory;

    iget-object v1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->c:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/moji/forum/ui/MojiFragmentTabHost$DummyTabFactory;-><init>(Landroid/content/Context;)V

    invoke-virtual {p1, v0}, Landroid/widget/TabHost$TabSpec;->setContent(Landroid/widget/TabHost$TabContentFactory;)Landroid/widget/TabHost$TabSpec;

    .line 262
    invoke-virtual {p1}, Landroid/widget/TabHost$TabSpec;->getTag()Ljava/lang/String;

    move-result-object v0

    .line 264
    new-instance v1, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    invoke-direct {v1, v0, p2, p3}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;-><init>(Ljava/lang/String;Ljava/lang/Class;Landroid/os/Bundle;)V

    .line 266
    iget-boolean p2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->h:Z

    if-eqz p2, :cond_0

    .line 270
    iget-object p2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->d:Landroid/support/v4/app/FragmentManager;

    invoke-virtual {p2, v0}, Landroid/support/v4/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroid/support/v4/app/Fragment;

    move-result-object p2

    invoke-static {v1, p2}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;Landroid/support/v4/app/Fragment;)Landroid/support/v4/app/Fragment;

    .line 271
    invoke-static {v1}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object p2

    if-eqz p2, :cond_0

    invoke-static {v1}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object p2

    invoke-virtual {p2}, Landroid/support/v4/app/Fragment;->isDetached()Z

    move-result p2

    if-nez p2, :cond_0

    .line 272
    iget-object p2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->d:Landroid/support/v4/app/FragmentManager;

    invoke-virtual {p2}, Landroid/support/v4/app/FragmentManager;->beginTransaction()Landroid/support/v4/app/FragmentTransaction;

    move-result-object p2

    .line 274
    invoke-static {v1}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object p3

    invoke-virtual {p2, p3}, Landroid/support/v4/app/FragmentTransaction;->hide(Landroid/support/v4/app/Fragment;)Landroid/support/v4/app/FragmentTransaction;

    .line 275
    invoke-direct {p0, p2}, Lcom/moji/forum/ui/MojiFragmentTabHost;->a(Landroid/support/v4/app/FragmentTransaction;)V

    .line 279
    :cond_0
    iget-object p2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->a:Ljava/util/ArrayList;

    invoke-virtual {p2, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 280
    invoke-virtual {p0, p1}, Lcom/moji/forum/ui/MojiFragmentTabHost;->addTab(Landroid/widget/TabHost$TabSpec;)V

    return-void
.end method

.method public getCurrentFragment()Landroid/support/v4/app/Fragment;
    .locals 2

    .line 257
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->a:Ljava/util/ArrayList;

    invoke-virtual {p0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->getCurrentTab()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    invoke-static {v0}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    return-object v0
.end method

.method protected onAttachedToWindow()V
    .locals 6

    .line 285
    invoke-super {p0}, Landroid/widget/TabHost;->onAttachedToWindow()V

    .line 287
    invoke-virtual {p0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->getCurrentTabTag()Ljava/lang/String;

    move-result-object v0

    .line 292
    iget-object v1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    const/4 v2, 0x0

    :cond_0
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_3

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    .line 293
    iget-object v4, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->d:Landroid/support/v4/app/FragmentManager;

    invoke-static {v3}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->b(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Landroid/support/v4/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroid/support/v4/app/Fragment;

    move-result-object v4

    invoke-static {v3, v4}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;Landroid/support/v4/app/Fragment;)Landroid/support/v4/app/Fragment;

    .line 295
    invoke-static {v3}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object v4

    if-eqz v4, :cond_0

    .line 296
    invoke-static {v3}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->b(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v4, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 300
    iput-object v3, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->g:Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    goto :goto_0

    :cond_1
    if-nez v2, :cond_2

    .line 305
    iget-object v2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->d:Landroid/support/v4/app/FragmentManager;

    invoke-virtual {v2}, Landroid/support/v4/app/FragmentManager;->beginTransaction()Landroid/support/v4/app/FragmentTransaction;

    move-result-object v2

    .line 308
    :cond_2
    invoke-static {v3}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;)Landroid/support/v4/app/Fragment;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/support/v4/app/FragmentTransaction;->hide(Landroid/support/v4/app/Fragment;)Landroid/support/v4/app/FragmentTransaction;

    goto :goto_0

    :cond_3
    const/4 v1, 0x1

    .line 315
    iput-boolean v1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->h:Z

    .line 316
    invoke-direct {p0, v0, v2}, Lcom/moji/forum/ui/MojiFragmentTabHost;->a(Ljava/lang/String;Landroid/support/v4/app/FragmentTransaction;)Landroid/support/v4/app/FragmentTransaction;

    move-result-object v0

    if-eqz v0, :cond_4

    .line 318
    invoke-direct {p0, v0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->a(Landroid/support/v4/app/FragmentTransaction;)V

    .line 319
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->d:Landroid/support/v4/app/FragmentManager;

    invoke-virtual {v0}, Landroid/support/v4/app/FragmentManager;->executePendingTransactions()Z

    :cond_4
    return-void
.end method

.method protected onDetachedFromWindow()V
    .locals 4

    .line 329
    invoke-super {p0}, Landroid/widget/TabHost;->onDetachedFromWindow()V

    .line 330
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->g:Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;Landroid/support/v4/app/Fragment;)Landroid/support/v4/app/Fragment;

    const/4 v0, 0x0

    const/4 v2, 0x0

    .line 331
    :goto_0
    iget-object v3, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->a:Ljava/util/ArrayList;

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v3

    if-ge v2, v3, :cond_0

    .line 332
    iget-object v3, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->a:Ljava/util/ArrayList;

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;

    invoke-static {v3, v1}, Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;->a(Lcom/moji/forum/ui/MojiFragmentTabHost$TabInfo;Landroid/support/v4/app/Fragment;)Landroid/support/v4/app/Fragment;

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 334
    :cond_0
    iget-object v1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->a:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->clear()V

    .line 335
    iput-boolean v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->h:Z

    return-void
.end method

.method protected onRestoreInstanceState(Landroid/os/Parcelable;)V
    .locals 1

    .line 348
    check-cast p1, Lcom/moji/forum/ui/MojiFragmentTabHost$SavedState;

    .line 349
    invoke-virtual {p1}, Lcom/moji/forum/ui/MojiFragmentTabHost$SavedState;->getSuperState()Landroid/os/Parcelable;

    move-result-object v0

    invoke-super {p0, v0}, Landroid/widget/TabHost;->onRestoreInstanceState(Landroid/os/Parcelable;)V

    .line 350
    iget-object p1, p1, Lcom/moji/forum/ui/MojiFragmentTabHost$SavedState;->curTab:Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/moji/forum/ui/MojiFragmentTabHost;->setCurrentTabByTag(Ljava/lang/String;)V

    return-void
.end method

.method protected onSaveInstanceState()Landroid/os/Parcelable;
    .locals 2

    .line 340
    invoke-super {p0}, Landroid/widget/TabHost;->onSaveInstanceState()Landroid/os/Parcelable;

    move-result-object v0

    .line 341
    new-instance v1, Lcom/moji/forum/ui/MojiFragmentTabHost$SavedState;

    invoke-direct {v1, v0}, Lcom/moji/forum/ui/MojiFragmentTabHost$SavedState;-><init>(Landroid/os/Parcelable;)V

    .line 342
    invoke-virtual {p0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->getCurrentTabTag()Ljava/lang/String;

    move-result-object v0

    iput-object v0, v1, Lcom/moji/forum/ui/MojiFragmentTabHost$SavedState;->curTab:Ljava/lang/String;

    return-object v1
.end method

.method protected onSizeChanged(IIII)V
    .locals 0

    .line 403
    iput p2, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->j:I

    .line 404
    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->l:Landroid/view/animation/Animation;

    if-eqz p1, :cond_0

    iget-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->k:Landroid/view/animation/Animation;

    if-nez p1, :cond_1

    .line 405
    :cond_0
    invoke-direct {p0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->a()V

    :cond_1
    return-void
.end method

.method public onTabChanged(Ljava/lang/String;)V
    .locals 1

    .line 355
    iget-boolean v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->h:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    .line 356
    invoke-direct {p0, p1, v0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->a(Ljava/lang/String;Landroid/support/v4/app/FragmentTransaction;)Landroid/support/v4/app/FragmentTransaction;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 358
    invoke-direct {p0, v0}, Lcom/moji/forum/ui/MojiFragmentTabHost;->a(Landroid/support/v4/app/FragmentTransaction;)V

    .line 361
    :cond_0
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->f:Landroid/widget/TabHost$OnTabChangeListener;

    if-eqz v0, :cond_1

    .line 362
    iget-object v0, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->f:Landroid/widget/TabHost$OnTabChangeListener;

    invoke-interface {v0, p1}, Landroid/widget/TabHost$OnTabChangeListener;->onTabChanged(Ljava/lang/String;)V

    :cond_1
    return-void
.end method

.method public setOnTabChangedListener(Landroid/widget/TabHost$OnTabChangeListener;)V
    .locals 0

    .line 253
    iput-object p1, p0, Lcom/moji/forum/ui/MojiFragmentTabHost;->f:Landroid/widget/TabHost$OnTabChangeListener;

    return-void
.end method

.method public setup()V
    .locals 2
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 212
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "Must call setup() that takes a Context and FragmentManager"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0
.end method
