.class public Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout; .super Landroid/widget/LinearLayout; .source "PullToRefreshLayout.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout$DragHelperCallback;, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout$pulltorefreshNotifier; } .end annotation # static fields .field private static viewHeight:I # instance fields .field private VDH:Lme/imid/swipebacklayout/lib/ViewDragHelper; .field private isPull:Z .field private myList:Landroid/view/View; .field private pullNotifier:Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout$pulltorefreshNotifier; .field private pullText:Landroid/widget/TextView; # direct methods .method static bridge synthetic -$$Nest$fgetmyList(Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;)Landroid/view/View; .registers 1 iget-object p0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; return-object p0 .end method .method static bridge synthetic -$$Nest$fgetpullText(Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;)Landroid/widget/TextView; .registers 1 iget-object p0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; return-object p0 .end method .method static bridge synthetic -$$Nest$monViewPosChanged(Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;II)V .registers 3 invoke-direct {p0, p1, p2}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->onViewPosChanged(II)V return-void .end method .method static bridge synthetic -$$Nest$mrefreshOrNot(Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;Landroid/view/View;F)V .registers 3 invoke-direct {p0, p1, p2}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->refreshOrNot(Landroid/view/View;F)V return-void .end method .method static bridge synthetic -$$Nest$sfgetviewHeight()I .registers 1 sget v0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->viewHeight:I return v0 .end method .method public constructor (Landroid/content/Context;Landroid/util/AttributeSet;)V .registers 3 .line 32 invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;->(Landroid/content/Context;Landroid/util/AttributeSet;)V const/4 p1, 0x1 .line 29 iput-boolean p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->isPull:Z .line 35 new-instance p1, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout$DragHelperCallback; const/4 p2, 0x0 invoke-direct {p1, p0, p2}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout$DragHelperCallback;->(Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout-IA;)V const/high16 p2, 0x41200000 # 10.0f invoke-static {p0, p2, p1}, Lme/imid/swipebacklayout/lib/ViewDragHelper;->create(Landroid/view/ViewGroup;FLme/imid/swipebacklayout/lib/ViewDragHelper$Callback;)Lme/imid/swipebacklayout/lib/ViewDragHelper; move-result-object p1 iput-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->VDH:Lme/imid/swipebacklayout/lib/ViewDragHelper; return-void .end method .method private init(Landroid/view/View;)V .registers 6 .line 43 new-instance v0, Landroid/widget/LinearLayout$LayoutParams; const/4 v1, -0x1 invoke-direct {v0, v1, v1}, Landroid/widget/LinearLayout$LayoutParams;->(II)V .line 46 iput-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; .line 47 const-string v2, "#FFFFFF" invoke-static {v2}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I move-result v3 invoke-virtual {p1, v3}, Landroid/view/View;->setBackgroundColor(I)V .line 48 iget-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; invoke-virtual {p1, v0}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V .line 49 new-instance p1, Landroid/widget/LinearLayout$LayoutParams; invoke-virtual {p0}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->getContext()Landroid/content/Context; move-result-object v0 const/high16 v3, 0x42c80000 # 100.0f invoke-static {v0, v3}, Lcom/forum/im/utils/ScreenUtil;->dip2px(Landroid/content/Context;F)I move-result v0 invoke-direct {p1, v1, v0}, Landroid/widget/LinearLayout$LayoutParams;->(II)V .line 50 new-instance v0, Landroid/widget/TextView; invoke-virtual {p0}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->getContext()Landroid/content/Context; move-result-object v1 invoke-direct {v0, v1}, Landroid/widget/TextView;->(Landroid/content/Context;)V iput-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; .line 51 const-string v1, "\u4e0b\u62c9\u52a0\u8f7d\u66f4\u591a" invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V .line 52 iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; invoke-static {v2}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I move-result v1 invoke-virtual {v0, v1}, Landroid/widget/TextView;->setBackgroundColor(I)V .line 53 iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; const/16 v1, 0x11 invoke-virtual {v0, v1}, Landroid/widget/TextView;->setGravity(I)V .line 54 iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; invoke-virtual {v0, p1}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V const/4 p1, 0x1 .line 55 invoke-virtual {p0, p1}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->setOrientation(I)V .line 57 iget-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; invoke-virtual {p0, p1}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->addView(Landroid/view/View;)V return-void .end method .method private onViewPosChanged(II)V .registers 3 const/4 p2, 0x1 if-ne p1, p2, :cond_19 .line 190 sget p1, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->viewHeight:I iget-object p2, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; invoke-virtual {p2}, Landroid/widget/TextView;->getTop()I move-result p2 add-int/2addr p1, p2 iget-object p2, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; .line 191 invoke-virtual {p2}, Landroid/view/View;->getTop()I move-result p2 sub-int/2addr p1, p2 .line 192 iget-object p2, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; invoke-virtual {p2, p1}, Landroid/view/View;->offsetTopAndBottom(I)V goto :goto_31 :cond_19 const/4 p2, 0x2 if-ne p1, p2, :cond_31 .line 194 iget-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; invoke-virtual {p1}, Landroid/view/View;->getTop()I move-result p1 sget p2, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->viewHeight:I sub-int/2addr p1, p2 iget-object p2, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; .line 195 invoke-virtual {p2}, Landroid/widget/TextView;->getTop()I move-result p2 sub-int/2addr p1, p2 .line 196 iget-object p2, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; invoke-virtual {p2, p1}, Landroid/widget/TextView;->offsetTopAndBottom(I)V .line 198 :cond_31 :goto_31 invoke-virtual {p0}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->invalidate()V return-void .end method .method private refreshOrNot(Landroid/view/View;F)V .registers 5 .line 203 iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; const/4 v1, 0x0 if-ne p1, v0, :cond_f const/high16 p1, -0x3db80000 # -50.0f cmpg-float p1, p2, p1 if-gez p1, :cond_c goto :goto_21 .line 208 :cond_c sget p1, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->viewHeight:I goto :goto_33 .line 212 :cond_f sget v0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->viewHeight:I add-int/lit8 v0, v0, -0x5 int-to-float v0, v0 cmpl-float p2, p2, v0 if-gtz p2, :cond_23 invoke-virtual {p1}, Landroid/view/View;->getTop()I move-result p1 sget p2, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->viewHeight:I if-lt p1, p2, :cond_21 goto :goto_23 :cond_21 :goto_21 move p1, v1 goto :goto_33 .line 213 :cond_23 :goto_23 sget p1, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->viewHeight:I .line 214 iget-object p2, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullNotifier:Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout$pulltorefreshNotifier; if-eqz p2, :cond_2c .line 215 invoke-interface {p2}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout$pulltorefreshNotifier;->onPull()V .line 217 :cond_2c iget-object p2, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; const-string v0, "\u6b63\u5728\u52a0\u8f7d" invoke-virtual {p2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V .line 221 :goto_33 iget-object p2, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->VDH:Lme/imid/swipebacklayout/lib/ViewDragHelper; iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; invoke-virtual {p2, v0, v1, p1}, Lme/imid/swipebacklayout/lib/ViewDragHelper;->smoothSlideViewTo(Landroid/view/View;II)Z move-result p1 if-eqz p1, :cond_40 .line 222 invoke-static {p0}, Landroidx/core/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V :cond_40 return-void .end method .method public static resolveSizeAndState(III)I .registers 5 .line 94 invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I move-result v0 .line 95 invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I move-result p1 const/high16 v1, -0x80000000 if-eq v0, v1, :cond_13 const/high16 v1, 0x40000000 # 2.0f if-eq v0, v1, :cond_11 goto :goto_18 :cond_11 move p0, p1 goto :goto_18 :cond_13 if-ge p1, p0, :cond_18 const/high16 p0, 0x1000000 or-int/2addr p0, p1 :cond_18 :goto_18 const/high16 p1, -0x1000000 and-int/2addr p1, p2 or-int/2addr p0, p1 return p0 .end method # virtual methods .method public computeScroll()V .registers 3 .line 234 iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->VDH:Lme/imid/swipebacklayout/lib/ViewDragHelper; const/4 v1, 0x1 invoke-virtual {v0, v1}, Lme/imid/swipebacklayout/lib/ViewDragHelper;->continueSettling(Z)Z move-result v0 if-eqz v0, :cond_c .line 235 invoke-static {p0}, Landroidx/core/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V :cond_c return-void .end method .method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z .registers 3 .line 116 iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->VDH:Lme/imid/swipebacklayout/lib/ViewDragHelper; invoke-virtual {v0, p1}, Lme/imid/swipebacklayout/lib/ViewDragHelper;->shouldInterceptTouchEvent(Landroid/view/MotionEvent;)Z move-result p1 if-eqz p1, :cond_e iget-boolean p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->isPull:Z if-eqz p1, :cond_e const/4 p1, 0x1 goto :goto_f :cond_e const/4 p1, 0x0 :goto_f return p1 .end method .method protected onLayout(ZIIII)V .registers 8 .line 77 iget-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; invoke-virtual {p1}, Landroid/widget/TextView;->getTop()I move-result p1 if-nez p1, :cond_2f .line 78 iget-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; invoke-virtual {p1}, Landroid/widget/TextView;->getMeasuredHeight()I move-result p1 sput p1, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->viewHeight:I .line 79 iget-object p3, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; const/4 v0, 0x0 invoke-virtual {p3, p2, v0, p4, p1}, Landroid/widget/TextView;->layout(IIII)V .line 80 iget-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; invoke-virtual {p0}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->getContext()Landroid/content/Context; move-result-object p3 const/high16 v1, 0x42400000 # 48.0f invoke-static {p3, v1}, Lcom/forum/im/utils/ScreenUtil;->dip2px(Landroid/content/Context;F)I move-result p3 sub-int/2addr p5, p3 invoke-virtual {p1, p2, v0, p4, p5}, Landroid/view/View;->layout(IIII)V .line 81 iget-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; sget p2, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->viewHeight:I neg-int p2, p2 invoke-virtual {p1, p2}, Landroid/widget/TextView;->offsetTopAndBottom(I)V goto :goto_4d .line 83 :cond_2f iget-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; invoke-virtual {p1}, Landroid/widget/TextView;->getTop()I move-result p3 iget-object p5, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullText:Landroid/widget/TextView; invoke-virtual {p5}, Landroid/widget/TextView;->getBottom()I move-result p5 invoke-virtual {p1, p2, p3, p4, p5}, Landroid/widget/TextView;->layout(IIII)V .line 84 iget-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; invoke-virtual {p1}, Landroid/view/View;->getTop()I move-result p3 iget-object p5, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; invoke-virtual {p5}, Landroid/view/View;->getBottom()I move-result p5 invoke-virtual {p1, p2, p3, p4, p5}, Landroid/view/View;->layout(IIII)V :goto_4d return-void .end method .method protected onMeasure(II)V .registers 6 .line 66 invoke-virtual {p0, p1, p2}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->measureChildren(II)V .line 68 invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I move-result v0 .line 69 invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I move-result v1 const/4 v2, 0x0 .line 71 invoke-static {v0, p1, v2}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->resolveSizeAndState(III)I move-result p1 .line 72 invoke-static {v1, p2, v2}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->resolveSizeAndState(III)I move-result p2 .line 70 invoke-virtual {p0, p1, p2}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->setMeasuredDimension(II)V return-void .end method .method public onTouchEvent(Landroid/view/MotionEvent;)Z .registers 3 .line 123 iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->VDH:Lme/imid/swipebacklayout/lib/ViewDragHelper; invoke-virtual {v0, p1}, Lme/imid/swipebacklayout/lib/ViewDragHelper;->processTouchEvent(Landroid/view/MotionEvent;)V const/4 p1, 0x1 return p1 .end method .method public refreshComplete()V .registers 4 .line 227 iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->VDH:Lme/imid/swipebacklayout/lib/ViewDragHelper; iget-object v1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; const/4 v2, 0x0 invoke-virtual {v0, v1, v2, v2}, Lme/imid/swipebacklayout/lib/ViewDragHelper;->smoothSlideViewTo(Landroid/view/View;II)Z move-result v0 if-eqz v0, :cond_e .line 228 invoke-static {p0}, Landroidx/core/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V :cond_e return-void .end method .method public returnMylist()Landroid/view/View; .registers 2 .line 61 iget-object v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->myList:Landroid/view/View; return-object v0 .end method .method public setPullGone()V .registers 2 const/4 v0, 0x0 .line 251 iput-boolean v0, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->isPull:Z return-void .end method .method public setSlideView(Landroid/view/View;)V .registers 2 .line 39 invoke-direct {p0, p1}, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->init(Landroid/view/View;)V return-void .end method .method public setpulltorefreshNotifier(Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout$pulltorefreshNotifier;)V .registers 2 .line 240 iput-object p1, p0, Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout;->pullNotifier:Lcom/forum/im/widget/pulltorefresh/PullToRefreshLayout$pulltorefreshNotifier; return-void .end method