288 lines
5.9 KiB
Smali
288 lines
5.9 KiB
Smali
.class public Lcom/moji/mjweather/feed/view/FeedDetailWebView;
|
|
.super Lcom/tencent/smtt/sdk/WebView;
|
|
.source "FeedDetailWebView.java"
|
|
|
|
|
|
# instance fields
|
|
.field public a:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 0
|
|
|
|
.line 25
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lcom/tencent/smtt/sdk/WebView;-><init>(Landroid/content/Context;)V
|
|
|
|
.line 26
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->i()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 0
|
|
|
|
.line 30
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/tencent/smtt/sdk/WebView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
.line 31
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->i()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 0
|
|
|
|
.line 35
|
|
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/tencent/smtt/sdk/WebView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
.line 36
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->i()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private i()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()V
|
|
.locals 4
|
|
|
|
.line 77
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getChildCount()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 78
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
.line 79
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getContentHeight()I
|
|
|
|
move-result v2
|
|
|
|
int-to-float v2, v2
|
|
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getScale()F
|
|
|
|
move-result v3
|
|
|
|
mul-float v2, v2, v3
|
|
|
|
.line 80
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getWebScrollY()I
|
|
|
|
move-result v3
|
|
|
|
int-to-float v3, v3
|
|
|
|
sub-float/2addr v2, v3
|
|
|
|
float-to-int v2, v2
|
|
|
|
.line 82
|
|
invoke-virtual {v1, v0, v2}, Landroid/view/View;->scrollBy(II)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public b()V
|
|
.locals 2
|
|
|
|
.line 87
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getWebScrollY()I
|
|
|
|
move-result v0
|
|
|
|
.line 88
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getChildCount()I
|
|
|
|
move-result v1
|
|
|
|
if-lez v1, :cond_0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 89
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getChildAt(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
.line 90
|
|
invoke-virtual {v1, v0, v0}, Landroid/view/View;->scrollTo(II)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public getStatus()I
|
|
.locals 3
|
|
|
|
.line 56
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getHeight()I
|
|
|
|
move-result v0
|
|
|
|
.line 57
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getContentHeight()I
|
|
|
|
move-result v1
|
|
|
|
int-to-float v1, v1
|
|
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getScale()F
|
|
|
|
move-result v2
|
|
|
|
mul-float v1, v1, v2
|
|
|
|
.line 58
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getWebScrollY()I
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
int-to-float v2, v2
|
|
|
|
int-to-float v0, v0
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
.line 61
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->f()F
|
|
|
|
move-result v0
|
|
|
|
sub-float/2addr v1, v0
|
|
|
|
cmpl-float v0, v2, v1
|
|
|
|
if-ltz v0, :cond_1
|
|
|
|
const/4 v0, 0x2
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getType()I
|
|
.locals 3
|
|
|
|
.line 69
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getContentHeight()I
|
|
|
|
move-result v0
|
|
|
|
int-to-float v0, v0
|
|
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getScale()F
|
|
|
|
move-result v1
|
|
|
|
mul-float v0, v0, v1
|
|
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/view/FeedDetailWebView;->getHeight()I
|
|
|
|
move-result v1
|
|
|
|
int-to-float v1, v1
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->f()F
|
|
|
|
move-result v2
|
|
|
|
add-float/2addr v1, v2
|
|
|
|
cmpg-float v0, v0, v1
|
|
|
|
if-gtz v0, :cond_0
|
|
|
|
const/4 v0, 0x3
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x4
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getWebScrollY()I
|
|
.locals 4
|
|
|
|
.line 48
|
|
:try_start_0
|
|
invoke-super {p0}, Lcom/tencent/smtt/sdk/WebView;->getWebScrollY()I
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v1, "hgd"
|
|
|
|
.line 50
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "---"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|