[Java] 纯文本查看 复制代码
.method private createPopupWindow(Landroid/view/View;)V
.locals 7
.param p1, "parent" # Landroid/view/View;
.prologue
const/4 v5, -0x2
.line 1507
iget-object v4, p0, Lcom/anyview/core/AnyviewV2x;->mPopupWindow:Landroid/widget/PopupWindow;
if-nez v4, :cond_0
.line 1508
new-instance v4, Landroid/widget/PopupWindow;
.line 1509
invoke-direct {v4, p1, v5, v5}, Landroid/widget/PopupWindow;-><init>(Landroid/view/View;II)V
.line 1508
iput-object v4, p0, Lcom/anyview/core/AnyviewV2x;->mPopupWindow:Landroid/widget/PopupWindow;
.line 1510
iget-object v4, p0, Lcom/anyview/core/AnyviewV2x;->mPopupWindow:Landroid/widget/PopupWindow;
const/4 v5, 0x1
invoke-virtual {v4, v5}, Landroid/widget/PopupWindow;->setOutsideTouchable(Z)V
.line 1511
iget-object v4, p0, Lcom/anyview/core/AnyviewV2x;->mPopupWindow:Landroid/widget/PopupWindow;
new-instance v5, Landroid/graphics/drawable/ColorDrawable;
const/4 v6, 0x0
invoke-direct {v5, v6}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V
invoke-virtual {v4, v5}, Landroid/widget/PopupWindow;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
.line 1514
:cond_0
invoke-virtual {p0}, Lcom/anyview/core/AnyviewV2x;->getLayoutInflater()Landroid/view/LayoutInflater;
move-result-object v4
.line 1515
const v5, 0x7f030012
const/4 v6, 0x0
.line 1514
invoke-virtual {v4, v5, v6}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v0
.line 1516
.line 1518
.local v2, "tempView":Landroid/view/View;
const v4, 0x7f0900b1
invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v4
invoke-virtual {v4, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 1522
const v4, 0x7f0900bd
invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v4
invoke-virtual {v4, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 1526
const v4, 0x7f0900b7
invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v4
invoke-virtual {v4, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 1528
const/4 v1, 0x0
.local v1, "i":I
:goto_0
const/4 v4, 0x3
if-lt v1, v4, :cond_1
.line 1538
iget-object v4, p0, Lcom/anyview/core/AnyviewV2x;->mPopupWindow:Landroid/widget/PopupWindow;
invoke-virtual {v4, v0}, Landroid/widget/PopupWindow;->setContentView(Landroid/view/View;)V
.line 1539
return-void
.line 1531
:cond_1
new-instance v4, Ljava/lang/StringBuilder;
const-string v5, "tv_title"
invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
const-string v5, "id"
invoke-virtual {p0}, Lcom/anyview/core/AnyviewV2x;->getPackageName()Ljava/lang/String;
move-result-object v6
.line 1530
invoke-static {p0, v4, v5, v6}, Lcom/anyview/core/AppShelfAdapter;->getResourceId(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v3
.line 1529
check-cast v3, Landroid/widget/TextView;
.line 1532
.local v3, "tv":Landroid/widget/TextView;
invoke-static {v3}, Lcom/anyview/res/SkinBuilder;->setTextViewColor(Landroid/widget/TextView;)V
.line 1534
new-instance v4, Ljava/lang/StringBuilder;
const-string v5, "iv_icon"
invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 1535
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
const-string v5, "id"
invoke-virtual {p0}, Lcom/anyview/core/AnyviewV2x;->getPackageName()Ljava/lang/String;
move-result-object v6
.line 1534
invoke-static {p0, v4, v5, v6}, Lcom/anyview/core/AppShelfAdapter;->getResourceId(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v4
invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v4
.line 1533
check-cast v4, Landroid/widget/ImageView;
invoke-static {v4}, Lcom/anyview/res/SkinBuilder;->changeImageMode(Landroid/widget/ImageView;)V
.line 1528
add-int/lit8 v1, v1, 0x1
goto :goto_0
.end method