StarLayout.smali

.class public Lcom/cleanmaster/hpsharelib/view/StarLayout;
.super Landroid/widget/LinearLayout;
.source "StarLayout.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/cleanmaster/hpsharelib/view/StarLayout$StarListener;
    }
.end annotation


# instance fields
.field private durations:[I

.field private mStarListener:Lcom/cleanmaster/hpsharelib/view/StarLayout$StarListener;

.field private starViews:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/cleanmaster/hpsharelib/view/StarView;",
            ">;"
        }
    .end annotation
.end field


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

    .prologue
    .line 25
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

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

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

    iput-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->starViews:Ljava/util/List;

    .line 20
    const/4 v0, 0x5

    new-array v0, v0, [I

    fill-array-data v0, :array_16

    iput-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->durations:[I

    .line 26
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->init()V

    .line 27
    return-void

    .line 20
    :array_16
    .array-data 4
        0x1f4
        0x1c2
        0x190
        0x15e
        0x12c
    .end array-data
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 4
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

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

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

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

    iput-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->starViews:Ljava/util/List;

    .line 20
    const/4 v0, 0x5

    new-array v0, v0, [I

    fill-array-data v0, :array_16

    iput-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->durations:[I

    .line 31
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->init()V

    .line 32
    return-void

    .line 20
    :array_16
    .array-data 4
        0x1f4
        0x1c2
        0x190
        0x15e
        0x12c
    .end array-data
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 5
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    .prologue
    .line 35
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

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

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

    iput-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->starViews:Ljava/util/List;

    .line 20
    const/4 v0, 0x5

    new-array v0, v0, [I

    fill-array-data v0, :array_16

    iput-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->durations:[I

    .line 36
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->init()V

    .line 38
    return-void

    .line 20
    :array_16
    .array-data 4
        0x1f4
        0x1c2
        0x190
        0x15e
        0x12c
    .end array-data
.end method

.method static synthetic access$000(Lcom/cleanmaster/hpsharelib/view/StarLayout;)V
    .registers 1

    .prologue
    .line 16
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->reset()V

    return-void
.end method

.method static synthetic access$100(Lcom/cleanmaster/hpsharelib/view/StarLayout;)Ljava/util/List;
    .registers 2

    .prologue
    .line 16
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->starViews:Ljava/util/List;

    return-object v0
.end method

.method static synthetic access$200(Lcom/cleanmaster/hpsharelib/view/StarLayout;I)V
    .registers 2

    .prologue
    .line 16
    invoke-direct {p0, p1}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->render(I)V

    return-void
.end method

.method static synthetic access$300(Lcom/cleanmaster/hpsharelib/view/StarLayout;)Lcom/cleanmaster/hpsharelib/view/StarLayout$StarListener;
    .registers 2

    .prologue
    .line 16
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->mStarListener:Lcom/cleanmaster/hpsharelib/view/StarLayout$StarListener;

    return-object v0
.end method

.method static synthetic access$400(Lcom/cleanmaster/hpsharelib/view/StarLayout;)[I
    .registers 2

    .prologue
    .line 16
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->durations:[I

    return-object v0
.end method

.method static synthetic access$500(Lcom/cleanmaster/hpsharelib/view/StarLayout;ILcom/cleanmaster/hpsharelib/view/StarView;)V
    .registers 3

    .prologue
    .line 16
    invoke-direct {p0, p1, p2}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->play(ILcom/cleanmaster/hpsharelib/view/StarView;)V

    return-void
.end method

.method private init()V
    .registers 7

    .prologue
    const/4 v0, 0x0

    const/high16 v5, 0x42480000    # 50.0f

    .line 41
    invoke-virtual {p0, v0}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->setOrientation(I)V

    .line 42
    :goto_6
    const/4 v1, 0x5

    if-ge v0, v1, :cond_48

    .line 43
    new-instance v1, Lcom/cleanmaster/hpsharelib/view/StarView;

    invoke-virtual {p0}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/cleanmaster/hpsharelib/view/StarView;-><init>(Landroid/content/Context;)V

    .line 44
    const-class v2, Lcom/cleanmaster/hpsharelib/view/StarLayout;

    invoke-virtual {v2}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v2

    const-string v3, "view"

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 45
    iget-object v2, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->starViews:Ljava/util/List;

    invoke-interface {v2, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 46
    new-instance v2, Landroid/widget/LinearLayout$LayoutParams;

    invoke-virtual {p0}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v3, v5}, Lcom/cleanmaster/hpsharelib/base/util/system/DimenUtils;->dp2px(Landroid/content/Context;F)I

    move-result v3

    invoke-virtual {p0}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-static {v4, v5}, Lcom/cleanmaster/hpsharelib/base/util/system/DimenUtils;->dp2px(Landroid/content/Context;F)I

    move-result v4

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

    invoke-virtual {v1, v2}, Lcom/cleanmaster/hpsharelib/view/StarView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 47
    invoke-virtual {p0, v1}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->addView(Landroid/view/View;)V

    .line 48
    new-instance v2, Lcom/cleanmaster/hpsharelib/view/StarLayout$1;

    invoke-direct {v2, p0}, Lcom/cleanmaster/hpsharelib/view/StarLayout$1;-><init>(Lcom/cleanmaster/hpsharelib/view/StarLayout;)V

    invoke-virtual {v1, v2}, Lcom/cleanmaster/hpsharelib/view/StarView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 42
    add-int/lit8 v0, v0, 0x1

    goto :goto_6

    .line 59
    :cond_48
    return-void
.end method

.method private play(ILcom/cleanmaster/hpsharelib/view/StarView;)V
    .registers 4

    .prologue
    .line 108
    if-nez p2, :cond_3

    .line 130
    :goto_2
    return-void

    .line 112
    :cond_3
    new-instance v0, Lcom/cleanmaster/hpsharelib/view/StarLayout$4;

    invoke-direct {v0, p0, p2}, Lcom/cleanmaster/hpsharelib/view/StarLayout$4;-><init>(Lcom/cleanmaster/hpsharelib/view/StarLayout;Lcom/cleanmaster/hpsharelib/view/StarView;)V

    invoke-virtual {p2, p1, v0}, Lcom/cleanmaster/hpsharelib/view/StarView;->play(ILcom/cleanmaster/hpsharelib/view/StarView$AnimatorCallBack;)V

    goto :goto_2
.end method

.method private render(I)V
    .registers 4

    .prologue
    .line 65
    const/4 v0, 0x0

    move v1, v0

    :goto_2
    if-ge v1, p1, :cond_13

    .line 66
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->starViews:Ljava/util/List;

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

    move-result-object v0

    check-cast v0, Lcom/cleanmaster/hpsharelib/view/StarView;

    .line 67
    invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/view/StarView;->visible()V

    .line 65
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_2

    .line 70
    :cond_13
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->starViews:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/cleanmaster/hpsharelib/view/StarView;

    new-instance v1, Lcom/cleanmaster/hpsharelib/view/StarLayout$2;

    invoke-direct {v1, p0, p1}, Lcom/cleanmaster/hpsharelib/view/StarLayout$2;-><init>(Lcom/cleanmaster/hpsharelib/view/StarLayout;I)V

    invoke-virtual {v0, v1}, Lcom/cleanmaster/hpsharelib/view/StarView;->click(Lcom/cleanmaster/hpsharelib/view/StarView$AnimatorCallBack;)V

    .line 89
    return-void
.end method

.method private reset()V
    .registers 3

    .prologue
    .line 133
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->starViews:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

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

    move-result v0

    if-eqz v0, :cond_16

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

    move-result-object v0

    check-cast v0, Lcom/cleanmaster/hpsharelib/view/StarView;

    .line 134
    invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/view/StarView;->reset()V

    goto :goto_6

    .line 136
    :cond_16
    return-void
.end method


# virtual methods
.method public play()V
    .registers 5

    .prologue
    .line 95
    new-instance v0, Lcom/cleanmaster/hpsharelib/view/StarLayout$3;

    invoke-direct {v0, p0}, Lcom/cleanmaster/hpsharelib/view/StarLayout$3;-><init>(Lcom/cleanmaster/hpsharelib/view/StarLayout;)V

    const-wide/16 v2, 0x190

    invoke-virtual {p0, v0, v2, v3}, Lcom/cleanmaster/hpsharelib/view/StarLayout;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 105
    return-void
.end method

.method public setStarListener(Lcom/cleanmaster/hpsharelib/view/StarLayout$StarListener;)V
    .registers 2

    .prologue
    .line 143
    iput-object p1, p0, Lcom/cleanmaster/hpsharelib/view/StarLayout;->mStarListener:Lcom/cleanmaster/hpsharelib/view/StarLayout$StarListener;

    .line 144
    return-void
.end method