apkfuckery/com.discord/smali_classes2/com/lytefast/flexinput/fragment/FlexInputFragment.smali
2019-12-06 04:29:40 +01:00

1248 lines
40 KiB
Smali

.class public Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.super Landroidx/fragment/app/Fragment;
.source "FlexInputFragment.java"
# interfaces
.implements Lcom/lytefast/flexinput/FlexInputCoordinator;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/fragment/app/Fragment;",
"Lcom/lytefast/flexinput/FlexInputCoordinator<",
"Ljava/lang/Object;",
">;"
}
.end annotation
# static fields
.field public static final t:Ljava/lang/String;
# instance fields
.field public d:Landroid/view/View;
.field public e:Landroid/view/View;
.field public f:Landroid/widget/LinearLayout;
.field public g:Landroid/view/View;
.field public h:Landroidx/recyclerview/widget/RecyclerView;
.field public i:Landroidx/appcompat/widget/AppCompatEditText;
.field public j:Landroidx/appcompat/widget/AppCompatImageButton;
.field public k:Landroidx/appcompat/widget/AppCompatImageButton;
.field public l:Landroid/view/View;
.field public m:Ljava/lang/Runnable;
.field public n:Le/b/a/c/a;
.field public o:Lcom/lytefast/flexinput/InputListener;
.field public p:Lcom/lytefast/flexinput/managers/FileManager;
.field public q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter<",
"Lcom/lytefast/flexinput/model/Attachment<",
"Ljava/lang/Object;",
">;>;"
}
.end annotation
.end field
.field public r:[Le/b/a/b/a$b;
.field public s:Z
# direct methods
.method public static constructor <clinit>()V
.locals 1
const-class v0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->t:Ljava/lang/String;
return-void
.end method
.method public constructor <init>()V
.locals 1
invoke-direct {p0}, Landroidx/fragment/app/Fragment;-><init>()V
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->s:Z
return-void
.end method
.method public static synthetic a(Lcom/lytefast/flexinput/fragment/FlexInputFragment;Landroid/content/res/TypedArray;)V
.locals 0
invoke-virtual {p0, p1}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->a(Landroid/content/res/TypedArray;)V
return-void
.end method
# virtual methods
.method public a(Landroidx/fragment/app/Fragment;)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.locals 2
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getChildFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object v0
invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
move-result-object v0
sget v1, Lcom/lytefast/flexinput/R$e;->emoji_container:I
invoke-virtual {v0, v1, p1}, Landroidx/fragment/app/FragmentTransaction;->replace(ILandroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;
move-result-object p1
invoke-virtual {p1}, Landroidx/fragment/app/FragmentTransaction;->commit()I
iget-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->j:Landroidx/appcompat/widget/AppCompatImageButton;
const/4 v0, 0x0
invoke-virtual {p1, v0}, Landroid/widget/ImageButton;->setVisibility(I)V
return-object p0
.end method
.method public a(Lcom/lytefast/flexinput/InputListener;)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.locals 0
.param p1 # Lcom/lytefast/flexinput/InputListener;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iput-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->o:Lcom/lytefast/flexinput/InputListener;
return-object p0
.end method
.method public a(Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.locals 2
.param p1 # Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter<",
"Lcom/lytefast/flexinput/model/Attachment<",
"Ljava/lang/Object;",
">;>;)",
"Lcom/lytefast/flexinput/fragment/FlexInputFragment;"
}
.end annotation
invoke-virtual {p1}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->b()Lcom/lytefast/flexinput/utils/SelectionAggregator;
move-result-object v0
iget-object v1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {v1}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->b()Lcom/lytefast/flexinput/utils/SelectionAggregator;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/lytefast/flexinput/utils/SelectionAggregator;->initFrom(Lcom/lytefast/flexinput/utils/SelectionAggregator;)Lcom/lytefast/flexinput/utils/SelectionAggregator;
iput-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
iget-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->h:Landroidx/recyclerview/widget/RecyclerView;
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {p1, v0}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
return-object p0
.end method
.method public a(Lcom/lytefast/flexinput/managers/FileManager;)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.locals 0
.param p1 # Lcom/lytefast/flexinput/managers/FileManager;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iput-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->p:Lcom/lytefast/flexinput/managers/FileManager;
return-object p0
.end method
.method public a(Le/b/a/c/a;)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.locals 0
iput-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->n:Le/b/a/c/a;
return-object p0
.end method
.method public varargs a([Le/b/a/b/a$b;)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.locals 0
iput-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->r:[Le/b/a/b/a$b;
return-object p0
.end method
.method public final a(Landroid/content/res/TypedArray;)V
.locals 2
sget v0, Lcom/lytefast/flexinput/R$i;->FlexInput_hint:I
invoke-virtual {p1, v0}, Landroid/content/res/TypedArray;->getText(I)Ljava/lang/CharSequence;
move-result-object v0
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_0
iget-object v1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {v1, v0}, Landroid/widget/EditText;->setHint(Ljava/lang/CharSequence;)V
:cond_0
sget v0, Lcom/lytefast/flexinput/R$i;->FlexInput_hintColor:I
invoke-virtual {p1, v0}, Landroid/content/res/TypedArray;->hasValue(I)Z
move-result v0
if-eqz v0, :cond_1
sget v0, Lcom/lytefast/flexinput/R$i;->FlexInput_hintColor:I
const v1, -0x333334
invoke-virtual {p1, v0, v1}, Landroid/content/res/TypedArray;->getColor(II)I
move-result v0
iget-object v1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {v1, v0}, Landroid/widget/EditText;->setHintTextColor(I)V
:cond_1
sget v0, Lcom/lytefast/flexinput/R$i;->FlexInput_previewBackground:I
invoke-virtual {p1, v0}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object p1
if-eqz p1, :cond_2
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getView()Landroid/view/View;
move-result-object v0
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->d:Landroid/view/View;
invoke-virtual {v0, p1}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V
:cond_2
return-void
.end method
.method public a(Landroid/text/Editable;)V
.locals 2
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->k:Landroidx/appcompat/widget/AppCompatImageButton;
iget-boolean v1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->s:Z
if-eqz v1, :cond_1
invoke-interface {p1}, Landroid/text/Editable;->length()I
move-result p1
if-gtz p1, :cond_0
iget-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {p1}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->getItemCount()I
move-result p1
if-lez p1, :cond_1
:cond_0
const/4 p1, 0x1
goto :goto_0
:cond_1
const/4 p1, 0x0
:goto_0
invoke-virtual {v0, p1}, Landroid/widget/ImageButton;->setEnabled(Z)V
return-void
.end method
.method public final a(Landroidx/appcompat/widget/AppCompatEditText;)V
.locals 1
new-instance v0, Lcom/lytefast/flexinput/fragment/FlexInputFragment$g;
invoke-direct {v0, p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment$g;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {p1, v0}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V
new-instance v0, Lcom/lytefast/flexinput/fragment/FlexInputFragment$h;
invoke-direct {v0, p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment$h;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V
instance-of v0, p1, Lcom/lytefast/flexinput/widget/FlexEditText;
if-eqz v0, :cond_0
check-cast p1, Lcom/lytefast/flexinput/widget/FlexEditText;
invoke-virtual {p1}, Lcom/lytefast/flexinput/widget/FlexEditText;->getInputContentHandler()Lkotlin/jvm/functions/Function1;
move-result-object v0
if-nez v0, :cond_0
new-instance v0, Lcom/lytefast/flexinput/fragment/FlexInputFragment$a;
invoke-direct {v0, p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment$a;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {p1, v0}, Lcom/lytefast/flexinput/widget/FlexEditText;->setInputContentHandler(Lkotlin/jvm/functions/Function1;)V
:cond_0
return-void
.end method
.method public a(Lcom/lytefast/flexinput/model/Attachment;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/lytefast/flexinput/model/Attachment<",
"*>;)V"
}
.end annotation
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getChildFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object v0
const-string v1, "Add Content"
invoke-virtual {v0, v1}, Landroidx/fragment/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroidx/fragment/app/Fragment;
move-result-object v0
check-cast v0, Landroidx/fragment/app/DialogFragment;
new-instance v1, Lcom/lytefast/flexinput/utils/SelectionCoordinator;
const/4 v2, 0x0
const/4 v3, 0x3
invoke-direct {v1, v2, v2, v3}, Lcom/lytefast/flexinput/utils/SelectionCoordinator;-><init>(Landroidx/collection/ArrayMap;Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;I)V
iget-object v2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {v2}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->b()Lcom/lytefast/flexinput/utils/SelectionAggregator;
move-result-object v2
invoke-virtual {v2, v1}, Lcom/lytefast/flexinput/utils/SelectionAggregator;->registerSelectionCoordinator(Lcom/lytefast/flexinput/utils/SelectionCoordinator;)V
const/4 v2, 0x0
invoke-virtual {v1, p1, v2}, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->b(Ljava/lang/Object;I)V
invoke-virtual {v1}, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->b()V
iget-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->h:Landroidx/recyclerview/widget/RecyclerView;
new-instance v1, Lcom/lytefast/flexinput/fragment/FlexInputFragment$d;
invoke-direct {v1, p0, v0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment$d;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;Landroidx/fragment/app/DialogFragment;)V
invoke-virtual {p1, v1}, Landroid/view/ViewGroup;->post(Ljava/lang/Runnable;)Z
return-void
.end method
.method public a(Ljava/lang/String;)V
.locals 1
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {v0, p1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result p1
invoke-virtual {v0, p1}, Landroid/widget/EditText;->setSelection(I)V
:cond_0
return-void
.end method
.method public a(Z)V
.locals 2
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getChildFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object v0
sget v1, Lcom/lytefast/flexinput/R$e;->emoji_container:I
invoke-virtual {v0, v1}, Landroidx/fragment/app/FragmentManager;->findFragmentById(I)Landroidx/fragment/app/Fragment;
move-result-object v0
if-eqz v0, :cond_0
instance-of v1, v0, Le/b/a/e/b;
if-eqz v1, :cond_0
check-cast v0, Le/b/a/e/b;
invoke-interface {v0, p1}, Le/b/a/e/b;->isShown(Z)V
:cond_0
return-void
.end method
.method public a(Landroid/view/MotionEvent;)Z
.locals 1
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result p1
const/4 v0, 0x1
if-eq p1, v0, :cond_0
goto :goto_0
:cond_0
invoke-virtual {p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->e()Z
:goto_0
const/4 p1, 0x0
return p1
.end method
.method public a(Landroid/view/View;)Z
.locals 2
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {p1}, Landroid/view/View;->getContentDescription()Ljava/lang/CharSequence;
move-result-object p1
const/4 v1, 0x0
invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object p1
invoke-virtual {p1}, Landroid/widget/Toast;->show()V
const/4 p1, 0x1
return p1
.end method
.method public b(Landroidx/appcompat/widget/AppCompatEditText;)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.locals 2
sget v0, Lcom/lytefast/flexinput/R$e;->text_input:I
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setId(I)V
const/4 v0, 0x1
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setFocusable(Z)V
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setFocusableInTouchMode(Z)V
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->f:Landroid/widget/LinearLayout;
new-instance v1, Lcom/lytefast/flexinput/fragment/FlexInputFragment$b;
invoke-direct {v1, p0, p1}, Lcom/lytefast/flexinput/fragment/FlexInputFragment$b;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;Landroidx/appcompat/widget/AppCompatEditText;)V
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->post(Ljava/lang/Runnable;)Z
return-object p0
.end method
.method public b(Z)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
.locals 2
iput-boolean p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->s:Z
const/4 v0, 0x0
:goto_0
iget-object v1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->f:Landroid/widget/LinearLayout;
invoke-virtual {v1}, Landroid/widget/LinearLayout;->getChildCount()I
move-result v1
if-ge v0, v1, :cond_0
iget-object v1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->f:Landroid/widget/LinearLayout;
invoke-virtual {v1, v0}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1, p1}, Landroid/view/View;->setEnabled(Z)V
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_0
if-eqz p1, :cond_1
iget-object p1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {p1}, Landroidx/appcompat/widget/AppCompatEditText;->getText()Landroid/text/Editable;
move-result-object p1
invoke-virtual {p0, p1}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->a(Landroid/text/Editable;)V
:cond_1
return-object p0
.end method
.method public b()Lcom/lytefast/flexinput/utils/SelectionAggregator;
.locals 1
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/lytefast/flexinput/utils/SelectionAggregator<",
"Lcom/lytefast/flexinput/model/Attachment<",
"Ljava/lang/Object;",
">;>;"
}
.end annotation
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {v0}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->b()Lcom/lytefast/flexinput/utils/SelectionAggregator;
move-result-object v0
return-object v0
.end method
.method public c()V
.locals 2
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {v0}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->a()V
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->d:Landroid/view/View;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {v0}, Landroidx/appcompat/widget/AppCompatEditText;->getText()Landroid/text/Editable;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->a(Landroid/text/Editable;)V
return-void
.end method
.method public d()[Le/b/a/b/a$b;
.locals 2
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->r:[Le/b/a/b/a$b;
if-eqz v0, :cond_0
array-length v1, v0
if-nez v1, :cond_1
:cond_0
sget-object v0, Le/b/a/b/a;->b:Le/b/a/b/a$a;
invoke-virtual {v0}, Le/b/a/b/a$a;->a()[Le/b/a/b/a$b;
move-result-object v0
:cond_1
return-object v0
.end method
.method public e()Z
.locals 3
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->g:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->isShown()Z
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
:cond_0
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->g:Landroid/view/View;
const/16 v2, 0x8
invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->j:Landroidx/appcompat/widget/AppCompatImageButton;
sget v2, Lcom/lytefast/flexinput/R$d;->ic_insert_emoticon_24dp:I
invoke-virtual {v0, v2}, Landroidx/appcompat/widget/AppCompatImageButton;->setImageResource(I)V
invoke-virtual {p0, v1}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->a(Z)V
const/4 v0, 0x1
return v0
.end method
.method public f()Z
.locals 1
iget-boolean v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->s:Z
return v0
.end method
.method public g()V
.locals 3
invoke-virtual {p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->e()Z
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->n:Le/b/a/c/a;
invoke-interface {v0}, Le/b/a/c/a;->requestHide()V
:try_start_0
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getChildFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object v0
invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
move-result-object v0
new-instance v1, Le/b/a/a/a;
invoke-direct {v1}, Le/b/a/a/a;-><init>()V
const-string v2, "Add Content"
invoke-virtual {v1, v0, v2}, Le/b/a/a/a;->show(Landroidx/fragment/app/FragmentTransaction;Ljava/lang/String;)I
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getChildFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object v0
invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->executePendingTransactions()Z
invoke-virtual {v1}, Landroidx/fragment/app/DialogFragment;->getDialog()Landroid/app/Dialog;
move-result-object v0
new-instance v2, Le/b/a/a/f;
invoke-direct {v2, p0, v1}, Le/b/a/a/f;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;Le/b/a/a/a;)V
invoke-virtual {v0, v2}, Landroid/app/Dialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception v0
sget-object v1, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->t:Ljava/lang/String;
const-string v2, "Could not open AddContentDialogFragment"
invoke-static {v1, v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:goto_0
return-void
.end method
.method public getFileManager()Lcom/lytefast/flexinput/managers/FileManager;
.locals 1
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->p:Lcom/lytefast/flexinput/managers/FileManager;
return-object v0
.end method
.method public h()V
.locals 2
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->g:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->getVisibility()I
move-result v0
if-nez v0, :cond_0
invoke-virtual {p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->e()Z
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->n:Le/b/a/c/a;
iget-object v1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-interface {v0, v1}, Le/b/a/c/a;->requestDisplay(Landroid/widget/EditText;)V
goto :goto_0
:cond_0
invoke-virtual {p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->k()V
:goto_0
return-void
.end method
.method public i()V
.locals 3
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->o:Lcom/lytefast/flexinput/InputListener;
iget-object v1, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {v1}, Landroidx/appcompat/widget/AppCompatEditText;->getText()Landroid/text/Editable;
move-result-object v1
iget-object v2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {v2}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->b()Lcom/lytefast/flexinput/utils/SelectionAggregator;
move-result-object v2
invoke-virtual {v2}, Lcom/lytefast/flexinput/utils/SelectionAggregator;->getAttachments()Ljava/util/ArrayList;
move-result-object v2
invoke-interface {v0, v1, v2}, Lcom/lytefast/flexinput/InputListener;->onSend(Landroid/text/Editable;Ljava/util/List;)Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
const-string v1, ""
invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
invoke-virtual {p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->c()V
:cond_0
return-void
.end method
.method public j()V
.locals 2
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {v0}, Landroid/widget/EditText;->requestFocus()Z
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->g:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->getVisibility()I
move-result v0
if-nez v0, :cond_0
return-void
:cond_0
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
new-instance v1, Lcom/lytefast/flexinput/fragment/FlexInputFragment$c;
invoke-direct {v1, p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment$c;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {v0, v1}, Landroid/widget/EditText;->post(Ljava/lang/Runnable;)Z
return-void
.end method
.method public k()V
.locals 2
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->g:Landroid/view/View;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->n:Le/b/a/c/a;
invoke-interface {v0}, Le/b/a/c/a;->requestHide()V
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->j:Landroidx/appcompat/widget/AppCompatImageButton;
sget v1, Lcom/lytefast/flexinput/R$d;->ic_keyboard_24dp:I
invoke-virtual {v0, v1}, Landroidx/appcompat/widget/AppCompatImageButton;->setImageResource(I)V
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->a(Z)V
return-void
.end method
.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
.locals 2
.param p1 # Landroid/view/LayoutInflater;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/view/ViewGroup;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.param p3 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
sget p3, Lcom/lytefast/flexinput/R$f;->flex_input_widget:I
const/4 v0, 0x0
invoke-virtual {p1, p3, p2, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object p1
check-cast p1, Landroid/widget/LinearLayout;
sget p2, Lcom/lytefast/flexinput/R$e;->attachment_preview_container:I
invoke-virtual {p1, p2}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object p2
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->d:Landroid/view/View;
sget p2, Lcom/lytefast/flexinput/R$e;->attachment_clear_btn:I
invoke-virtual {p1, p2}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object p2
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->e:Landroid/view/View;
iget-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->e:Landroid/view/View;
new-instance p3, Lcom/lytefast/flexinput/fragment/FlexInputFragment$f;
invoke-direct {p3, p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment$f;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {p2, p3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
sget p2, Lcom/lytefast/flexinput/R$e;->main_input_container:I
invoke-virtual {p1, p2}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object p2
check-cast p2, Landroid/widget/LinearLayout;
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->f:Landroid/widget/LinearLayout;
sget p2, Lcom/lytefast/flexinput/R$e;->emoji_container:I
invoke-virtual {p1, p2}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object p2
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->g:Landroid/view/View;
sget p2, Lcom/lytefast/flexinput/R$e;->attachment_preview_list:I
invoke-virtual {p1, p2}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object p2
check-cast p2, Landroidx/recyclerview/widget/RecyclerView;
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->h:Landroidx/recyclerview/widget/RecyclerView;
sget p2, Lcom/lytefast/flexinput/R$e;->text_input:I
invoke-virtual {p1, p2}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object p2
check-cast p2, Landroidx/appcompat/widget/AppCompatEditText;
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
iget-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {p0, p2}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->a(Landroidx/appcompat/widget/AppCompatEditText;)V
sget p2, Lcom/lytefast/flexinput/R$e;->emoji_btn:I
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p2
check-cast p2, Landroidx/appcompat/widget/AppCompatImageButton;
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->j:Landroidx/appcompat/widget/AppCompatImageButton;
iget-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->j:Landroidx/appcompat/widget/AppCompatImageButton;
new-instance p3, Le/b/a/a/h;
invoke-direct {p3, p0}, Le/b/a/a/h;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {p2, p3}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
sget p2, Lcom/lytefast/flexinput/R$e;->send_btn:I
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p2
check-cast p2, Landroidx/appcompat/widget/AppCompatImageButton;
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->k:Landroidx/appcompat/widget/AppCompatImageButton;
iget-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->k:Landroidx/appcompat/widget/AppCompatImageButton;
new-instance p3, Le/b/a/a/i;
invoke-direct {p3, p0}, Le/b/a/a/i;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {p2, p3}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
sget p2, Lcom/lytefast/flexinput/R$e;->add_btn:I
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p2
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->l:Landroid/view/View;
iget-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->l:Landroid/view/View;
new-instance p3, Le/b/a/a/j;
invoke-direct {p3, p0}, Le/b/a/a/j;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {p2, p3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
const/4 p2, 0x4
new-array p2, p2, [Landroid/view/View;
iget-object p3, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->e:Landroid/view/View;
aput-object p3, p2, v0
iget-object p3, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->l:Landroid/view/View;
const/4 v1, 0x1
aput-object p3, p2, v1
iget-object p3, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->j:Landroidx/appcompat/widget/AppCompatImageButton;
const/4 v1, 0x2
aput-object p3, p2, v1
iget-object p3, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->k:Landroidx/appcompat/widget/AppCompatImageButton;
const/4 v1, 0x3
aput-object p3, p2, v1
invoke-static {p2}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object p2
invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p2
:goto_0
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
move-result p3
if-eqz p3, :cond_0
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object p3
check-cast p3, Landroid/view/View;
new-instance v1, Le/b/a/a/k;
invoke-direct {v1, p0}, Le/b/a/a/k;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {p3, v1}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
goto :goto_0
:cond_0
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getChildFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object p2
sget p3, Lcom/lytefast/flexinput/R$e;->emoji_container:I
invoke-virtual {p2, p3}, Landroidx/fragment/app/FragmentManager;->findFragmentById(I)Landroidx/fragment/app/Fragment;
move-result-object p2
if-eqz p2, :cond_1
iget-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->j:Landroidx/appcompat/widget/AppCompatImageButton;
invoke-virtual {p2, v0}, Landroid/widget/ImageButton;->setVisibility(I)V
:cond_1
iget-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->m:Ljava/lang/Runnable;
invoke-interface {p2}, Ljava/lang/Runnable;->run()V
const/4 p2, 0x0
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->m:Ljava/lang/Runnable;
new-instance p3, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
invoke-direct {p3, v0, p2}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;-><init>(Landroid/content/ContentResolver;Lkotlin/jvm/functions/Function1;)V
invoke-virtual {p0, p3}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->a(Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;)Lcom/lytefast/flexinput/fragment/FlexInputFragment;
return-object p1
.end method
.method public onInflate(Landroid/content/Context;Landroid/util/AttributeSet;Landroid/os/Bundle;)V
.locals 0
invoke-super {p0, p1, p2, p3}, Landroidx/fragment/app/Fragment;->onInflate(Landroid/content/Context;Landroid/util/AttributeSet;Landroid/os/Bundle;)V
new-instance p3, Lcom/lytefast/flexinput/fragment/FlexInputFragment$e;
invoke-direct {p3, p0, p1, p2}, Lcom/lytefast/flexinput/fragment/FlexInputFragment$e;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;Landroid/content/Context;Landroid/util/AttributeSet;)V
iput-object p3, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->m:Ljava/lang/Runnable;
new-instance p2, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object p1
invoke-direct {p2, p1}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;-><init>(Landroid/content/ContentResolver;)V
invoke-virtual {p2}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->b()Lcom/lytefast/flexinput/utils/SelectionAggregator;
move-result-object p1
new-instance p3, Le/b/a/a/g;
invoke-direct {p3, p0}, Le/b/a/a/g;-><init>(Lcom/lytefast/flexinput/fragment/FlexInputFragment;)V
invoke-virtual {p1, p3}, Lcom/lytefast/flexinput/utils/SelectionAggregator;->addItemSelectionListener(Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;)Lcom/lytefast/flexinput/utils/SelectionAggregator;
iput-object p2, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
return-void
.end method
.method public onPause()V
.locals 1
invoke-virtual {p0}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->e()Z
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->n:Le/b/a/c/a;
invoke-interface {v0}, Le/b/a/c/a;->requestHide()V
invoke-super {p0}, Landroidx/fragment/app/Fragment;->onPause()V
return-void
.end method
.method public onSaveInstanceState(Landroid/os/Bundle;)V
.locals 2
.param p1 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-super {p0, p1}, Landroidx/fragment/app/Fragment;->onSaveInstanceState(Landroid/os/Bundle;)V
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {v0}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->b()Lcom/lytefast/flexinput/utils/SelectionAggregator;
move-result-object v0
invoke-virtual {v0}, Lcom/lytefast/flexinput/utils/SelectionAggregator;->getAttachments()Ljava/util/ArrayList;
move-result-object v0
const-string v1, "FlexInput.ATTACHMENTS"
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putParcelableArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->i:Landroidx/appcompat/widget/AppCompatEditText;
invoke-virtual {v0}, Landroidx/appcompat/widget/AppCompatEditText;->getText()Landroid/text/Editable;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
const-string v1, "FlexInput.TEXT"
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
return-void
.end method
.method public onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
.locals 1
.param p1 # Landroid/view/View;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/os/Bundle;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
if-eqz p2, :cond_1
const-string p1, "FlexInput.ATTACHMENTS"
invoke-virtual {p2, p1}, Landroid/os/Bundle;->getParcelableArrayList(Ljava/lang/String;)Ljava/util/ArrayList;
move-result-object p1
if-eqz p1, :cond_0
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result v0
if-lez v0, :cond_0
iget-object v0, p0, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->q:Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;
invoke-virtual {v0}, Lcom/lytefast/flexinput/adapters/AttachmentPreviewAdapter;->b()Lcom/lytefast/flexinput/utils/SelectionAggregator;
move-result-object v0
invoke-virtual {v0, p1}, Lcom/lytefast/flexinput/utils/SelectionAggregator;->initFrom(Ljava/util/ArrayList;)Lcom/lytefast/flexinput/utils/SelectionAggregator;
:cond_0
const-string p1, "FlexInput.TEXT"
invoke-virtual {p2, p1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p0, p1}, Lcom/lytefast/flexinput/fragment/FlexInputFragment;->a(Ljava/lang/String;)V
:cond_1
return-void
.end method