152 lines
4.4 KiB
Smali
152 lines
4.4 KiB
Smali
.class final Landroidx/appcompat/widget/AppCompatTextViewAutoSizeHelper$Api23Impl;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
value = 0x17
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/appcompat/widget/AppCompatTextViewAutoSizeHelper;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Api23Impl"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 838
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static createStaticLayoutForMeasuring(Ljava/lang/CharSequence;Landroid/text/Layout$Alignment;IILandroid/widget/TextView;Landroid/text/TextPaint;Landroidx/appcompat/widget/AppCompatTextViewAutoSizeHelper$Impl;)Landroid/text/StaticLayout;
|
|
.locals 2
|
|
.param p0 # Ljava/lang/CharSequence;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Landroid/text/Layout$Alignment;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # Landroid/widget/TextView;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p5 # Landroid/text/TextPaint;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p6 # Landroidx/appcompat/widget/AppCompatTextViewAutoSizeHelper$Impl;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/DoNotInline;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 854
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 853
|
|
invoke-static {p0, v1, v0, p5, p2}, Landroid/text/StaticLayout$Builder;->obtain(Ljava/lang/CharSequence;IILandroid/text/TextPaint;I)Landroid/text/StaticLayout$Builder;
|
|
|
|
move-result-object p0
|
|
|
|
.line 856
|
|
invoke-virtual {p0, p1}, Landroid/text/StaticLayout$Builder;->setAlignment(Landroid/text/Layout$Alignment;)Landroid/text/StaticLayout$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
.line 858
|
|
invoke-virtual {p4}, Landroid/widget/TextView;->getLineSpacingExtra()F
|
|
|
|
move-result p2
|
|
|
|
.line 859
|
|
invoke-virtual {p4}, Landroid/widget/TextView;->getLineSpacingMultiplier()F
|
|
|
|
move-result p5
|
|
|
|
.line 857
|
|
invoke-virtual {p1, p2, p5}, Landroid/text/StaticLayout$Builder;->setLineSpacing(FF)Landroid/text/StaticLayout$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
.line 860
|
|
invoke-virtual {p4}, Landroid/widget/TextView;->getIncludeFontPadding()Z
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/text/StaticLayout$Builder;->setIncludePad(Z)Landroid/text/StaticLayout$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
.line 861
|
|
invoke-virtual {p4}, Landroid/widget/TextView;->getBreakStrategy()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/text/StaticLayout$Builder;->setBreakStrategy(I)Landroid/text/StaticLayout$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
.line 862
|
|
invoke-virtual {p4}, Landroid/widget/TextView;->getHyphenationFrequency()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/text/StaticLayout$Builder;->setHyphenationFrequency(I)Landroid/text/StaticLayout$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, -0x1
|
|
|
|
if-ne p3, p2, :cond_0
|
|
|
|
const p3, 0x7fffffff
|
|
|
|
.line 863
|
|
:cond_0
|
|
invoke-virtual {p1, p3}, Landroid/text/StaticLayout$Builder;->setMaxLines(I)Landroid/text/StaticLayout$Builder;
|
|
|
|
.line 868
|
|
:try_start_0
|
|
invoke-virtual {p6, p0, p4}, Landroidx/appcompat/widget/AppCompatTextViewAutoSizeHelper$Impl;->computeAndSetTextDirection(Landroid/text/StaticLayout$Builder;Landroid/widget/TextView;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
const-string p1, "ACTVAutoSizeHelper"
|
|
|
|
const-string p2, "Failed to obtain TextDirectionHeuristic, auto size may be incorrect"
|
|
|
|
.line 871
|
|
invoke-static {p1, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 873
|
|
:goto_0
|
|
invoke-virtual {p0}, Landroid/text/StaticLayout$Builder;->build()Landroid/text/StaticLayout;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|