PhotoPickerAlbumsCell$AlbumView.smali

.class Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;
.super Landroid/widget/FrameLayout;
.source "PhotoPickerAlbumsCell.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "AlbumView"
.end annotation


# instance fields
.field private countTextView:Landroid/widget/TextView;

.field private imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

.field private nameTextView:Landroid/widget/TextView;

.field private selector:Landroid/view/View;

.field final synthetic this$0:Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public constructor <init>(Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;Landroid/content/Context;)V
    .registers 20
    .param p2, "context"    # Landroid/content/Context;

    .line 41
    move-object/from16 v0, p0

    move-object/from16 v1, p2

    move-object/from16 v2, p1

    iput-object v2, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->this$0:Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;

    .line 42
    invoke-direct {v0, v1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 44
    new-instance v2, Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-direct {v2, v1}, Lim/tpelyyftgw/ui/components/BackupImageView;-><init>(Landroid/content/Context;)V

    iput-object v2, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    .line 45
    const/high16 v3, -0x40800000    # -1.0f

    const/4 v4, -0x1

    invoke-static {v4, v3}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(IF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v5

    invoke-virtual {v0, v2, v5}, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 47
    new-instance v2, Landroid/widget/LinearLayout;

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

    .line 48
    .local v2, "linearLayout":Landroid/widget/LinearLayout;
    const/4 v5, 0x0

    invoke-virtual {v2, v5}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 49
    const/high16 v6, 0x7f000000

    invoke-virtual {v2, v6}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V

    .line 50
    const/16 v6, 0x1c

    const/16 v7, 0x53

    invoke-static {v4, v6, v7}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v6

    invoke-virtual {v0, v2, v6}, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 52
    new-instance v6, Landroid/widget/TextView;

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

    iput-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->nameTextView:Landroid/widget/TextView;

    .line 53
    const/high16 v7, 0x41500000    # 13.0f

    const/4 v8, 0x1

    invoke-virtual {v6, v8, v7}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 54
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->nameTextView:Landroid/widget/TextView;

    invoke-virtual {v6, v4}, Landroid/widget/TextView;->setTextColor(I)V

    .line 55
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->nameTextView:Landroid/widget/TextView;

    invoke-virtual {v6, v8}, Landroid/widget/TextView;->setSingleLine(Z)V

    .line 56
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->nameTextView:Landroid/widget/TextView;

    sget-object v9, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v6, v9}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    .line 57
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->nameTextView:Landroid/widget/TextView;

    invoke-virtual {v6, v8}, Landroid/widget/TextView;->setMaxLines(I)V

    .line 58
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->nameTextView:Landroid/widget/TextView;

    const/16 v9, 0x10

    invoke-virtual {v6, v9}, Landroid/widget/TextView;->setGravity(I)V

    .line 59
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->nameTextView:Landroid/widget/TextView;

    const/4 v10, 0x0

    const/4 v11, -0x1

    const/high16 v12, 0x3f800000    # 1.0f

    const/16 v13, 0x8

    const/4 v14, 0x0

    const/4 v15, 0x0

    const/16 v16, 0x0

    invoke-static/range {v10 .. v16}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createLinear(IIFIIII)Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v10

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

    .line 61
    new-instance v6, Landroid/widget/TextView;

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

    iput-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->countTextView:Landroid/widget/TextView;

    .line 62
    invoke-virtual {v6, v8, v7}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 63
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->countTextView:Landroid/widget/TextView;

    const v7, -0x555556

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setTextColor(I)V

    .line 64
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->countTextView:Landroid/widget/TextView;

    invoke-virtual {v6, v8}, Landroid/widget/TextView;->setSingleLine(Z)V

    .line 65
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->countTextView:Landroid/widget/TextView;

    sget-object v7, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    .line 66
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->countTextView:Landroid/widget/TextView;

    invoke-virtual {v6, v8}, Landroid/widget/TextView;->setMaxLines(I)V

    .line 67
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->countTextView:Landroid/widget/TextView;

    invoke-virtual {v6, v9}, Landroid/widget/TextView;->setGravity(I)V

    .line 68
    iget-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->countTextView:Landroid/widget/TextView;

    const/4 v7, -0x2

    const/4 v8, -0x1

    const/high16 v9, 0x40800000    # 4.0f

    const/4 v10, 0x0

    const/high16 v11, 0x40800000    # 4.0f

    const/4 v12, 0x0

    invoke-static/range {v7 .. v12}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createLinear(IIFFFF)Landroid/widget/LinearLayout$LayoutParams;

    move-result-object v7

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

    .line 70
    new-instance v6, Landroid/view/View;

    invoke-direct {v6, v1}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    iput-object v6, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->selector:Landroid/view/View;

    .line 71
    invoke-static {v5}, Lim/tpelyyftgw/ui/actionbar/Theme;->getSelectorDrawable(Z)Landroid/graphics/drawable/Drawable;

    move-result-object v5

    invoke-virtual {v6, v5}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 72
    iget-object v5, v0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->selector:Landroid/view/View;

    invoke-static {v4, v3}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(IF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v3

    invoke-virtual {v0, v5, v3}, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 73
    return-void
.end method

.method static synthetic access$100(Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;)Lim/tpelyyftgw/ui/components/BackupImageView;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;

    .line 34
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    return-object v0
.end method

.method static synthetic access$200(Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;)Landroid/widget/TextView;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;

    .line 34
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->nameTextView:Landroid/widget/TextView;

    return-object v0
.end method

.method static synthetic access$300(Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;)Landroid/widget/TextView;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;

    .line 34
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->countTextView:Landroid/widget/TextView;

    return-object v0
.end method


# virtual methods
.method protected onDraw(Landroid/graphics/Canvas;)V
    .registers 10
    .param p1, "canvas"    # Landroid/graphics/Canvas;

    .line 85
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/BackupImageView;->getImageReceiver()Lim/tpelyyftgw/messenger/ImageReceiver;

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/messenger/ImageReceiver;->hasNotThumb()Z

    move-result v0

    if-eqz v0, :cond_1c

    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/BackupImageView;->getImageReceiver()Lim/tpelyyftgw/messenger/ImageReceiver;

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/messenger/ImageReceiver;->getCurrentAlpha()F

    move-result v0

    const/high16 v1, 0x3f800000    # 1.0f

    cmpl-float v0, v0, v1

    if-eqz v0, :cond_45

    .line 86
    :cond_1c
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->this$0:Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;

    # getter for: Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;->backgroundPaint:Landroid/graphics/Paint;
    invoke-static {v0}, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;->access$000(Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;)Landroid/graphics/Paint;

    move-result-object v0

    const-string v1, "chat_attachPhotoBackground"

    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 87
    const/4 v3, 0x0

    const/4 v4, 0x0

    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/BackupImageView;->getMeasuredWidth()I

    move-result v0

    int-to-float v5, v0

    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/BackupImageView;->getMeasuredHeight()I

    move-result v0

    int-to-float v6, v0

    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->this$0:Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;

    # getter for: Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;->backgroundPaint:Landroid/graphics/Paint;
    invoke-static {v0}, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;->access$000(Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell;)Landroid/graphics/Paint;

    move-result-object v7

    move-object v2, p1

    invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V

    .line 89
    :cond_45
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 5
    .param p1, "event"    # Landroid/view/MotionEvent;

    .line 77
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x15

    if-lt v0, v1, :cond_13

    .line 78
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/PhotoPickerAlbumsCell$AlbumView;->selector:Landroid/view/View;

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v2

    invoke-virtual {v0, v1, v2}, Landroid/view/View;->drawableHotspotChanged(FF)V

    .line 80
    :cond_13
    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    return v0
.end method