You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
345 lines
8.4 KiB
345 lines
8.4 KiB
.class public Lcom/viatech/widget/TabPageView; |
|
.super Landroid/widget/RelativeLayout; |
|
.source "TabPageView.java" |
|
|
|
|
|
# annotations |
|
.annotation build Landroid/annotation/SuppressLint; |
|
value = { |
|
"Recycle" |
|
} |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field private mColorNormal:I |
|
|
|
.field private mColorSelected:I |
|
|
|
.field private mTabImageView:Landroid/widget/ImageView; |
|
|
|
.field private mTabPageNormalID:I |
|
|
|
.field private mTabPageSelectID:I |
|
|
|
.field private mTextID:I |
|
|
|
.field private mTextView:Landroid/widget/TextView; |
|
|
|
|
|
# direct methods |
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 35 |
|
const/4 v0, 0x0 |
|
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/viatech/widget/TabPageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V |
|
|
|
.line 36 |
|
return-void |
|
.end method |
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V |
|
.locals 3 |
|
|
|
.prologue |
|
const/4 v2, -0x1 |
|
|
|
.line 26 |
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V |
|
|
|
.line 19 |
|
iput v2, p0, Lcom/viatech/widget/TabPageView;->mTabPageNormalID:I |
|
|
|
.line 20 |
|
iput v2, p0, Lcom/viatech/widget/TabPageView;->mTabPageSelectID:I |
|
|
|
.line 21 |
|
iput v2, p0, Lcom/viatech/widget/TabPageView;->mTextID:I |
|
|
|
.line 27 |
|
sget-object v0, Lcom/via/vpai/R$styleable;->TabPage:[I |
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray; |
|
|
|
move-result-object v0 |
|
|
|
.line 28 |
|
const/4 v1, 0x0 |
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I |
|
|
|
move-result v1 |
|
|
|
iput v1, p0, Lcom/viatech/widget/TabPageView;->mTabPageNormalID:I |
|
|
|
.line 29 |
|
const/4 v1, 0x1 |
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I |
|
|
|
move-result v1 |
|
|
|
iput v1, p0, Lcom/viatech/widget/TabPageView;->mTabPageSelectID:I |
|
|
|
.line 30 |
|
const/4 v1, 0x4 |
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I |
|
|
|
move-result v1 |
|
|
|
iput v1, p0, Lcom/viatech/widget/TabPageView;->mTextID:I |
|
|
|
.line 31 |
|
invoke-direct {p0, v0}, Lcom/viatech/widget/TabPageView;->initView(Landroid/content/res/TypedArray;)V |
|
|
|
.line 32 |
|
return-void |
|
.end method |
|
|
|
.method private initView(Landroid/content/res/TypedArray;)V |
|
.locals 5 |
|
|
|
.prologue |
|
const/4 v4, 0x3 |
|
|
|
const/4 v3, 0x2 |
|
|
|
const/4 v2, -0x1 |
|
|
|
.line 51 |
|
invoke-virtual {p1, v3, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I |
|
|
|
move-result v0 |
|
|
|
.line 52 |
|
if-eq v0, v2, :cond_1 |
|
|
|
.line 53 |
|
invoke-virtual {p0}, Lcom/viatech/widget/TabPageView;->getContext()Landroid/content/Context; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1, v0}, Landroid/content/res/Resources;->getColor(I)I |
|
|
|
move-result v0 |
|
|
|
iput v0, p0, Lcom/viatech/widget/TabPageView;->mColorNormal:I |
|
|
|
.line 57 |
|
:goto_0 |
|
invoke-virtual {p1, v4, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I |
|
|
|
move-result v0 |
|
|
|
.line 58 |
|
if-eq v0, v2, :cond_2 |
|
|
|
.line 59 |
|
invoke-virtual {p0}, Lcom/viatech/widget/TabPageView;->getContext()Landroid/content/Context; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1, v0}, Landroid/content/res/Resources;->getColor(I)I |
|
|
|
move-result v0 |
|
|
|
iput v0, p0, Lcom/viatech/widget/TabPageView;->mColorSelected:I |
|
|
|
.line 63 |
|
:goto_1 |
|
invoke-virtual {p0}, Lcom/viatech/widget/TabPageView;->getContext()Landroid/content/Context; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, "layout_inflater" |
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Landroid/view/LayoutInflater; |
|
|
|
.line 64 |
|
const v1, 0x7f0300b2 |
|
|
|
invoke-virtual {v0, v1, p0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View; |
|
|
|
.line 65 |
|
const v0, 0x7f0c02d5 |
|
|
|
invoke-virtual {p0, v0}, Lcom/viatech/widget/TabPageView;->findViewById(I)Landroid/view/View; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Landroid/widget/ImageView; |
|
|
|
iput-object v0, p0, Lcom/viatech/widget/TabPageView;->mTabImageView:Landroid/widget/ImageView; |
|
|
|
.line 66 |
|
iget v0, p0, Lcom/viatech/widget/TabPageView;->mTabPageNormalID:I |
|
|
|
if-eq v0, v2, :cond_0 |
|
|
|
.line 67 |
|
iget-object v0, p0, Lcom/viatech/widget/TabPageView;->mTabImageView:Landroid/widget/ImageView; |
|
|
|
iget v1, p0, Lcom/viatech/widget/TabPageView;->mTabPageNormalID:I |
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V |
|
|
|
.line 68 |
|
:cond_0 |
|
const v0, 0x7f0c02d6 |
|
|
|
invoke-virtual {p0, v0}, Lcom/viatech/widget/TabPageView;->findViewById(I)Landroid/view/View; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Landroid/widget/TextView; |
|
|
|
iput-object v0, p0, Lcom/viatech/widget/TabPageView;->mTextView:Landroid/widget/TextView; |
|
|
|
.line 69 |
|
iget-object v0, p0, Lcom/viatech/widget/TabPageView;->mTextView:Landroid/widget/TextView; |
|
|
|
iget v1, p0, Lcom/viatech/widget/TabPageView;->mColorNormal:I |
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V |
|
|
|
.line 70 |
|
iget v0, p0, Lcom/viatech/widget/TabPageView;->mTextID:I |
|
|
|
if-eq v0, v2, :cond_3 |
|
|
|
.line 71 |
|
iget-object v0, p0, Lcom/viatech/widget/TabPageView;->mTextView:Landroid/widget/TextView; |
|
|
|
iget v1, p0, Lcom/viatech/widget/TabPageView;->mTextID:I |
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V |
|
|
|
.line 75 |
|
:goto_2 |
|
return-void |
|
|
|
.line 55 |
|
:cond_1 |
|
invoke-virtual {p0}, Lcom/viatech/widget/TabPageView;->getResources()Landroid/content/res/Resources; |
|
|
|
move-result-object v0 |
|
|
|
const v1, 0x7f0b00a1 |
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getColor(I)I |
|
|
|
move-result v0 |
|
|
|
invoke-virtual {p1, v3, v0}, Landroid/content/res/TypedArray;->getInt(II)I |
|
|
|
move-result v0 |
|
|
|
iput v0, p0, Lcom/viatech/widget/TabPageView;->mColorNormal:I |
|
|
|
goto :goto_0 |
|
|
|
.line 61 |
|
:cond_2 |
|
invoke-virtual {p0}, Lcom/viatech/widget/TabPageView;->getResources()Landroid/content/res/Resources; |
|
|
|
move-result-object v0 |
|
|
|
const v1, 0x7f0b00a2 |
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getColor(I)I |
|
|
|
move-result v0 |
|
|
|
invoke-virtual {p1, v4, v0}, Landroid/content/res/TypedArray;->getInt(II)I |
|
|
|
move-result v0 |
|
|
|
iput v0, p0, Lcom/viatech/widget/TabPageView;->mColorSelected:I |
|
|
|
goto :goto_1 |
|
|
|
.line 73 |
|
:cond_3 |
|
iget-object v0, p0, Lcom/viatech/widget/TabPageView;->mTextView:Landroid/widget/TextView; |
|
|
|
const/16 v1, 0x8 |
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V |
|
|
|
goto :goto_2 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public setTabSelect(Z)V |
|
.locals 2 |
|
|
|
.prologue |
|
const/4 v1, -0x1 |
|
|
|
.line 39 |
|
if-eqz p1, :cond_1 |
|
|
|
.line 40 |
|
iget v0, p0, Lcom/viatech/widget/TabPageView;->mTabPageNormalID:I |
|
|
|
if-eq v0, v1, :cond_0 |
|
|
|
.line 41 |
|
iget-object v0, p0, Lcom/viatech/widget/TabPageView;->mTabImageView:Landroid/widget/ImageView; |
|
|
|
iget v1, p0, Lcom/viatech/widget/TabPageView;->mTabPageSelectID:I |
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V |
|
|
|
.line 42 |
|
:cond_0 |
|
iget-object v0, p0, Lcom/viatech/widget/TabPageView;->mTextView:Landroid/widget/TextView; |
|
|
|
iget v1, p0, Lcom/viatech/widget/TabPageView;->mColorSelected:I |
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V |
|
|
|
.line 48 |
|
:goto_0 |
|
return-void |
|
|
|
.line 44 |
|
:cond_1 |
|
iget v0, p0, Lcom/viatech/widget/TabPageView;->mTabPageNormalID:I |
|
|
|
if-eq v0, v1, :cond_2 |
|
|
|
.line 45 |
|
iget-object v0, p0, Lcom/viatech/widget/TabPageView;->mTabImageView:Landroid/widget/ImageView; |
|
|
|
iget v1, p0, Lcom/viatech/widget/TabPageView;->mTabPageNormalID:I |
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V |
|
|
|
.line 46 |
|
:cond_2 |
|
iget-object v0, p0, Lcom/viatech/widget/TabPageView;->mTextView:Landroid/widget/TextView; |
|
|
|
iget v1, p0, Lcom/viatech/widget/TabPageView;->mColorNormal:I |
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V |
|
|
|
goto :goto_0 |
|
.end method
|
|
|