965 lines
27 KiB
Smali
965 lines
27 KiB
Smali
.class public Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;
|
|
.super Ljava/lang/Object;
|
|
.source "TouchEffectsCreateViewSubject.java"
|
|
|
|
# interfaces
|
|
.implements Lcom/lky/toucheffectsmodule/impl/TouchEffectsViewSubject;
|
|
|
|
|
|
# instance fields
|
|
.field private mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
.field private mScaleBean:Lcom/lky/toucheffectsmodule/bean/ScaleBean;
|
|
|
|
.field private mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;)V
|
|
.locals 0
|
|
|
|
.line 44
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 45
|
|
iput-object p1, p0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;Lcom/lky/toucheffectsmodule/bean/ColorBean;)V
|
|
.locals 0
|
|
|
|
.line 53
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 54
|
|
iput-object p1, p0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
.line 55
|
|
iput-object p2, p0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->mColorBean:Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;Lcom/lky/toucheffectsmodule/bean/ScaleBean;)V
|
|
.locals 0
|
|
|
|
.line 48
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 49
|
|
iput-object p1, p0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
.line 50
|
|
iput-object p2, p0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->mScaleBean:Lcom/lky/toucheffectsmodule/bean/ScaleBean;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private checkExtendView(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)Landroid/view/View;
|
|
.locals 1
|
|
|
|
const-string v0, "TextView"
|
|
|
|
.line 183
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 184
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsTextView;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsTextView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string v0, "Button"
|
|
|
|
.line 186
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 187
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsButton;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
const-string v0, "ImageView"
|
|
|
|
.line 189
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 190
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsImageView;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
const-string v0, "ImageButton"
|
|
|
|
.line 192
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 193
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsImageButton;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsImageButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_3
|
|
const-string v0, "FrameLayout"
|
|
|
|
.line 195
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
.line 196
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsFrameLayout;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsFrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_4
|
|
const-string v0, "LinearLayout"
|
|
|
|
.line 198
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
.line 199
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsLinearLayout;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsLinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_5
|
|
const-string v0, "RelativeLayout"
|
|
|
|
.line 201
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
.line 202
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsRelativeLayout;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsRelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_6
|
|
const-string v0, "ConstraintLayout"
|
|
|
|
.line 204
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
.line 205
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsConstraintLayout;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsConstraintLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_7
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private checkView(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)Landroid/view/View;
|
|
.locals 2
|
|
|
|
.line 153
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, -0x1
|
|
|
|
sparse-switch v0, :sswitch_data_0
|
|
|
|
goto/16 :goto_0
|
|
|
|
:sswitch_0
|
|
const-string v0, "Button"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x7
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_1
|
|
const-string v0, "FrameLayout"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x6
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_2
|
|
const-string v0, "LinearLayout"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v1, 0x5
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_3
|
|
const-string v0, "ImageView"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const/4 v1, 0x4
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_4
|
|
const-string v0, "android.support.constraint.ConstraintLayout"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
const/4 v1, 0x3
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_5
|
|
const-string v0, "RelativeLayout"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_5
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
const/4 v1, 0x2
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_6
|
|
const-string v0, "ImageButton"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_6
|
|
|
|
goto :goto_0
|
|
|
|
:cond_6
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:sswitch_7
|
|
const-string v0, "TextView"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_7
|
|
|
|
goto :goto_0
|
|
|
|
:cond_7
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
packed-switch v1, :pswitch_data_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
.line 158
|
|
:pswitch_0
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsButton;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 167
|
|
:pswitch_1
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsFrameLayout;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsFrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 170
|
|
:pswitch_2
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsLinearLayout;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsLinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 161
|
|
:pswitch_3
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsImageView;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 176
|
|
:pswitch_4
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsConstraintLayout;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsConstraintLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 173
|
|
:pswitch_5
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsRelativeLayout;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsRelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 164
|
|
:pswitch_6
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsImageButton;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsImageButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 155
|
|
:pswitch_7
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsTextView;
|
|
|
|
invoke-direct {p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/effects_view/TouchEffectsTextView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)V
|
|
|
|
:goto_1
|
|
return-object p1
|
|
|
|
nop
|
|
|
|
:sswitch_data_0
|
|
.sparse-switch
|
|
-0x37f7066e -> :sswitch_7
|
|
-0x37e04bb3 -> :sswitch_6
|
|
-0x1a719aca -> :sswitch_5
|
|
0x3ea16dda -> :sswitch_4
|
|
0x431b5280 -> :sswitch_3
|
|
0x43311acf -> :sswitch_2
|
|
0x4e20b2d7 -> :sswitch_1
|
|
0x77471352 -> :sswitch_0
|
|
.end sparse-switch
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_7
|
|
:pswitch_6
|
|
:pswitch_5
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method private checkViewName(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)Landroid/view/View;
|
|
.locals 1
|
|
|
|
const-string v0, "androidx."
|
|
|
|
.line 144
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 145
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->checkExtendView(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 147
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->checkView(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private findSystemViewChange(Landroid/view/View;Ljava/lang/String;Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
.locals 2
|
|
|
|
.line 120
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->getListWholeType()Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
instance-of v0, p1, Landroid/widget/ListView;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 123
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "widget.RecyclerView"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 124
|
|
:cond_0
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->getListWholeType()Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->getAdapter(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;)Lcom/lky/toucheffectsmodule/effects_adapter/EffectsAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
if-eqz p3, :cond_2
|
|
|
|
.line 126
|
|
invoke-direct {p0, p3}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->getAdapter(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;)Lcom/lky/toucheffectsmodule/effects_adapter/EffectsAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
move-object p1, v1
|
|
|
|
:goto_0
|
|
if-nez p1, :cond_3
|
|
|
|
return-object v1
|
|
|
|
.line 133
|
|
:cond_3
|
|
sget-object p3, Lcom/lky/toucheffectsmodule/types/TouchEffectsExtraType;->AspectRatio:Lcom/lky/toucheffectsmodule/types/TouchEffectsExtraType;
|
|
|
|
invoke-static {p3}, Lcom/lky/toucheffectsmodule/utils/TypeUtils;->isContainsExtraType(Lcom/lky/toucheffectsmodule/types/TouchEffectsExtraType;)Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_4
|
|
|
|
.line 134
|
|
new-instance p3, Lcom/lky/toucheffectsmodule/effects_proxy/AspectRatioEffectsProxy;
|
|
|
|
invoke-direct {p3, p1}, Lcom/lky/toucheffectsmodule/effects_proxy/AspectRatioEffectsProxy;-><init>(Lcom/lky/toucheffectsmodule/effects_adapter/EffectsAdapter;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 136
|
|
:cond_4
|
|
new-instance p3, Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;
|
|
|
|
invoke-direct {p3, p1}, Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;-><init>(Lcom/lky/toucheffectsmodule/effects_adapter/EffectsAdapter;)V
|
|
|
|
.line 139
|
|
:goto_1
|
|
invoke-direct {p0, p2, p4, p5, p3}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->checkViewName(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;Lcom/lky/toucheffectsmodule/effects_proxy/BaseEffectsProxy;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private getAdapter(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;)Lcom/lky/toucheffectsmodule/effects_adapter/EffectsAdapter;
|
|
.locals 2
|
|
|
|
.line 211
|
|
instance-of v0, p1, Lcom/lky/toucheffectsmodule/types/TouchEffectsSingleType;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 212
|
|
check-cast p1, Lcom/lky/toucheffectsmodule/types/TouchEffectsSingleType;
|
|
|
|
.line 213
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject$1;->$SwitchMap$com$lky$toucheffectsmodule$types$TouchEffectsSingleType:[I
|
|
|
|
invoke-virtual {p1}, Lcom/lky/toucheffectsmodule/types/TouchEffectsSingleType;->ordinal()I
|
|
|
|
move-result p1
|
|
|
|
aget p1, v0, p1
|
|
|
|
if-eq p1, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 215
|
|
:cond_0
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_adapter/TouchShakeAdapter;
|
|
|
|
invoke-direct {p1}, Lcom/lky/toucheffectsmodule/effects_adapter/TouchShakeAdapter;-><init>()V
|
|
|
|
return-object p1
|
|
|
|
.line 218
|
|
:cond_1
|
|
check-cast p1, Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
.line 219
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject$1;->$SwitchMap$com$lky$toucheffectsmodule$types$TouchEffectsWholeType:[I
|
|
|
|
invoke-virtual {p1}, Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;->ordinal()I
|
|
|
|
move-result p1
|
|
|
|
aget p1, v0, p1
|
|
|
|
if-eq p1, v1, :cond_5
|
|
|
|
const/4 v0, 0x2
|
|
|
|
if-eq p1, v0, :cond_4
|
|
|
|
const/4 v0, 0x3
|
|
|
|
if-eq p1, v0, :cond_3
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-eq p1, v0, :cond_2
|
|
|
|
:goto_0
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
.line 227
|
|
:cond_2
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_adapter/TouchRipple1Adapter;
|
|
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->getColorBean()Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Lcom/lky/toucheffectsmodule/effects_adapter/TouchRipple1Adapter;-><init>(Lcom/lky/toucheffectsmodule/bean/ColorBean;)V
|
|
|
|
return-object p1
|
|
|
|
.line 225
|
|
:cond_3
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_adapter/TouchStateAdapter;
|
|
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->getColorBean()Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Lcom/lky/toucheffectsmodule/effects_adapter/TouchStateAdapter;-><init>(Lcom/lky/toucheffectsmodule/bean/ColorBean;)V
|
|
|
|
return-object p1
|
|
|
|
.line 223
|
|
:cond_4
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_adapter/TouchRippleAdapter;
|
|
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->getColorBean()Lcom/lky/toucheffectsmodule/bean/ColorBean;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Lcom/lky/toucheffectsmodule/effects_adapter/TouchRippleAdapter;-><init>(Lcom/lky/toucheffectsmodule/bean/ColorBean;)V
|
|
|
|
return-object p1
|
|
|
|
.line 221
|
|
:cond_5
|
|
new-instance p1, Lcom/lky/toucheffectsmodule/effects_adapter/TouchScaleAdapter;
|
|
|
|
iget-object v0, p0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->mScaleBean:Lcom/lky/toucheffectsmodule/bean/ScaleBean;
|
|
|
|
invoke-direct {p1, v0}, Lcom/lky/toucheffectsmodule/effects_adapter/TouchScaleAdapter;-><init>(Lcom/lky/toucheffectsmodule/bean/ScaleBean;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private parseEffectsView(Landroid/view/View;Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
.locals 6
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p3
|
|
|
|
move-object v3, p2
|
|
|
|
move-object v4, p4
|
|
|
|
move-object v5, p5
|
|
|
|
.line 107
|
|
invoke-direct/range {v0 .. v5}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->findSystemViewChange(Landroid/view/View;Ljava/lang/String;Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private parseTypeView(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
.locals 6
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p2
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p3
|
|
|
|
move-object v4, p4
|
|
|
|
move-object v5, p5
|
|
|
|
.line 95
|
|
invoke-direct/range {v0 .. v5}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->parseEffectsView(Landroid/view/View;Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public createView(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
.locals 9
|
|
|
|
const-string v0, "."
|
|
|
|
.line 61
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, "android"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-object v1
|
|
|
|
.line 64
|
|
:cond_0
|
|
sget-object v0, Lcom/lky/toucheffectsmodule/R$styleable;->TouchEffectsView:[I
|
|
|
|
invoke-virtual {p3, p4, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object v0
|
|
|
|
.line 65
|
|
sget v2, Lcom/lky/toucheffectsmodule/R$styleable;->TouchEffectsView_touch_effects_type:I
|
|
|
|
const/4 v3, -0x1
|
|
|
|
invoke-virtual {v0, v2, v3}, Landroid/content/res/TypedArray;->getInt(II)I
|
|
|
|
move-result v2
|
|
|
|
.line 66
|
|
sget v4, Lcom/lky/toucheffectsmodule/R$styleable;->TouchEffectsView_touch_effects_forbid:I
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-virtual {v0, v4, v5}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
return-object v1
|
|
|
|
:cond_1
|
|
if-eq v2, v3, :cond_6
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne v2, v0, :cond_2
|
|
|
|
.line 72
|
|
sget-object v4, Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;->RIPPLE:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
move-object v3, p0
|
|
|
|
move-object v5, p1
|
|
|
|
move-object v6, p2
|
|
|
|
move-object v7, p3
|
|
|
|
move-object v8, p4
|
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->parseTypeView(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_2
|
|
const/4 v0, 0x2
|
|
|
|
if-ne v2, v0, :cond_3
|
|
|
|
.line 74
|
|
sget-object v4, Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;->STATE:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
move-object v3, p0
|
|
|
|
move-object v5, p1
|
|
|
|
move-object v6, p2
|
|
|
|
move-object v7, p3
|
|
|
|
move-object v8, p4
|
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->parseTypeView(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_3
|
|
const/4 v0, 0x3
|
|
|
|
if-ne v2, v0, :cond_4
|
|
|
|
.line 76
|
|
sget-object v4, Lcom/lky/toucheffectsmodule/types/TouchEffectsSingleType;->SHAKE:Lcom/lky/toucheffectsmodule/types/TouchEffectsSingleType;
|
|
|
|
move-object v3, p0
|
|
|
|
move-object v5, p1
|
|
|
|
move-object v6, p2
|
|
|
|
move-object v7, p3
|
|
|
|
move-object v8, p4
|
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->parseTypeView(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
const/4 v0, 0x4
|
|
|
|
if-ne v2, v0, :cond_5
|
|
|
|
.line 78
|
|
sget-object v4, Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;->RIPPLE_1:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
move-object v3, p0
|
|
|
|
move-object v5, p1
|
|
|
|
move-object v6, p2
|
|
|
|
move-object v7, p3
|
|
|
|
move-object v8, p4
|
|
|
|
invoke-direct/range {v3 .. v8}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->parseTypeView(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 80
|
|
:cond_5
|
|
sget-object v1, Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;->SCALE:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p2
|
|
|
|
move-object v4, p3
|
|
|
|
move-object v5, p4
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->parseTypeView(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 83
|
|
:cond_6
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->getViewTypes()Ljava/util/HashMap;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
.line 84
|
|
invoke-static {}, Lcom/lky/toucheffectsmodule/TouchEffectsManager;->getViewTypes()Ljava/util/HashMap;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v2, v0
|
|
|
|
check-cast v2, Lcom/lky/toucheffectsmodule/types/TouchEffectsType;
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v3, p1
|
|
|
|
move-object v4, p2
|
|
|
|
move-object v5, p3
|
|
|
|
move-object v6, p4
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->parseTypeView(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
.line 87
|
|
:cond_7
|
|
iget-object v1, p0, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->mTouchEffectsWholeType:Lcom/lky/toucheffectsmodule/types/TouchEffectsWholeType;
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p2
|
|
|
|
move-object v4, p3
|
|
|
|
move-object v5, p4
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/lky/toucheffectsmodule/proxy/TouchEffectsCreateViewSubject;->parseTypeView(Lcom/lky/toucheffectsmodule/types/TouchEffectsType;Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|