SearchFragment.smali
.class public Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;
.super Lhurriyet/mobil/android/hurriyet/fragments/BaseFragment;
.source "SearchFragment.java"
# interfaces
.implements Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter$SearchAdapterInterface;
# static fields
.field public static final TAG:Ljava/lang/String; = "SearchFragment"
# instance fields
.field private final CONTENT_SIZE_FOR_PAGE:I
.field private checkedSortIndex:I
.field private currentPage:I
.field private filteredAuthorList:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ltr/com/hurriyet/androidsdk/response/authors/Author;",
">;"
}
.end annotation
.end field
.field private filteredList:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ljava/io/Serializable;",
">;"
}
.end annotation
.end field
.field private mLinearLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
.field mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
.annotation runtime Lbutterknife/BindView;
value = 0x7f09017c
.end annotation
.end field
.field private mSearchAdapter:Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;
.field noResultView:Landroid/widget/LinearLayout;
.annotation runtime Lbutterknife/BindView;
value = 0x7f09017b
.end annotation
.end field
.field searchEt:Landroid/widget/EditText;
.annotation runtime Lbutterknife/BindView;
value = 0x7f09017a
.end annotation
.end field
.field private searchedText:Ljava/lang/String;
.field sortBtn:Lhurriyet/mobil/android/hurriyet/views/HurriyetTextView;
.annotation runtime Lbutterknife/BindView;
value = 0x7f09017d
.end annotation
.end field
.field private sortingType:Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchSortingType;
# direct methods
.method public constructor <init>()V
.registers 2
.line 52
invoke-direct {p0}, Lhurriyet/mobil/android/hurriyet/fragments/BaseFragment;-><init>()V
.line 57
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredList:Ljava/util/List;
.line 58
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredAuthorList:Ljava/util/List;
const/16 v0, 0xa
.line 60
iput v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->CONTENT_SIZE_FOR_PAGE:I
const/4 v0, 0x1
.line 61
iput v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->currentPage:I
const-string v0, ""
.line 62
iput-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchedText:Ljava/lang/String;
.line 63
sget-object v0, Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchSortingType;->SCORE:Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchSortingType;
iput-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->sortingType:Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchSortingType;
const/4 v0, 0x0
.line 65
iput v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->checkedSortIndex:I
return-void
.end method
.method static synthetic access$000(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;)I
.registers 1
.line 52
iget p0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->currentPage:I
return p0
.end method
.method static synthetic access$002(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;I)I
.registers 2
.line 52
iput p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->currentPage:I
return p1
.end method
.method static synthetic access$100(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;)Ljava/util/List;
.registers 1
.line 52
iget-object p0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredList:Ljava/util/List;
return-object p0
.end method
.method static synthetic access$102(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;Ljava/util/List;)Ljava/util/List;
.registers 2
.line 52
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredList:Ljava/util/List;
return-object p1
.end method
.method static synthetic access$202(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;Ljava/util/List;)Ljava/util/List;
.registers 2
.line 52
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredAuthorList:Ljava/util/List;
return-object p1
.end method
.method static synthetic access$300(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;Ljava/lang/String;)Ljava/util/List;
.registers 2
.line 52
invoke-direct {p0, p1}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getAuthorsFromLocal(Ljava/lang/String;)Ljava/util/List;
move-result-object p0
return-object p0
.end method
.method static synthetic access$400(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;)Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;
.registers 1
.line 52
iget-object p0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mSearchAdapter:Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;
return-object p0
.end method
.method static synthetic access$402(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;)Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;
.registers 2
.line 52
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mSearchAdapter:Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;
return-object p1
.end method
.method static synthetic access$500(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;)I
.registers 1
.line 52
iget p0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->checkedSortIndex:I
return p0
.end method
.method static synthetic access$502(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;I)I
.registers 2
.line 52
iput p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->checkedSortIndex:I
return p1
.end method
.method static synthetic access$602(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchSortingType;)Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchSortingType;
.registers 2
.line 52
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->sortingType:Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchSortingType;
return-object p1
.end method
.method static synthetic access$700(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;)Ljava/lang/String;
.registers 1
.line 52
iget-object p0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchedText:Ljava/lang/String;
return-object p0
.end method
.method static synthetic access$800(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;Ljava/lang/String;)V
.registers 2
.line 52
invoke-direct {p0, p1}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getData(Ljava/lang/String;)V
return-void
.end method
.method private chooseSortType()V
.registers 6
const v0, 0x7f10027c
.line 300
invoke-static {v0}, Lhurriyet/mobil/android/hurriyet/HApp;->getStrWithID(I)Ljava/lang/String;
move-result-object v0
const v1, 0x7f100239
invoke-static {v1}, Lhurriyet/mobil/android/hurriyet/HApp;->getStrWithID(I)Ljava/lang/String;
move-result-object v1
const v2, 0x7f100126
invoke-static {v2}, Lhurriyet/mobil/android/hurriyet/HApp;->getStrWithID(I)Ljava/lang/String;
move-result-object v2
invoke-virtual {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x7f030001
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
move-result-object v3
iget v4, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->checkedSortIndex:I
invoke-static {v0, v1, v2, v3, v4}, Lhurriyet/mobil/android/hurriyet/dialogs/GenderDialog;->newInstance(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;I)Lhurriyet/mobil/android/hurriyet/dialogs/GenderDialog;
move-result-object v0
.line 301
new-instance v1, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment$3;
invoke-direct {v1, p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment$3;-><init>(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;)V
invoke-virtual {v0, v1}, Lhurriyet/mobil/android/hurriyet/dialogs/GenderDialog;->setOnItemSelectedListener(Lhurriyet/mobil/android/hurriyet/dialogs/GenderDialog$GenderListener;)V
.line 320
invoke-virtual {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getFragmentManager()Landroidx/fragment/app/FragmentManager;
move-result-object v1
const-string v2, "SearchFragment"
invoke-virtual {v0, v1, v2}, Lhurriyet/mobil/android/hurriyet/dialogs/GenderDialog;->show(Landroidx/fragment/app/FragmentManager;Ljava/lang/String;)V
return-void
.end method
.method private getAuthorsFromLocal(Ljava/lang/String;)Ljava/util/List;
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Ljava/util/List<",
"Ltr/com/hurriyet/androidsdk/response/authors/Author;",
">;"
}
.end annotation
.line 276
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 277
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
iput-object v1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredAuthorList:Ljava/util/List;
.line 278
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object v1
invoke-virtual {v1}, Lhurriyet/mobil/android/hurriyet/HApp;->getAllAuthors()Ljava/util/ArrayList;
move-result-object v1
invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_18
:goto_18
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_51
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ltr/com/hurriyet/androidsdk/response/authors/Author;
.line 279
invoke-virtual {v2}, Ltr/com/hurriyet/androidsdk/response/authors/Author;->getFirstName()Ljava/lang/String;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
move-result-object v3
invoke-virtual {p1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-nez v3, :cond_48
.line 280
invoke-virtual {v2}, Ltr/com/hurriyet/androidsdk/response/authors/Author;->getLastName()Ljava/lang/String;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
move-result-object v3
invoke-virtual {p1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_18
.line 281
:cond_48
invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 282
iget-object v3, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredAuthorList:Ljava/util/List;
invoke-interface {v3, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_18
:cond_51
return-object v0
.end method
.method private getData(Ljava/lang/String;)V
.registers 11
.line 168
invoke-virtual {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v0
check-cast v0, Lhurriyet/mobil/android/hurriyet/activities/main/MainActivity;
invoke-virtual {v0}, Lhurriyet/mobil/android/hurriyet/activities/main/MainActivity;->getMaLoadingHelper()Lhurriyet/mobil/android/hurriyet/activities/main/MaLoadingHelper;
move-result-object v0
const-string v1, "search"
const/4 v2, 0x1
invoke-virtual {v0, v1, v2, v2}, Lhurriyet/mobil/android/hurriyet/activities/main/MaLoadingHelper;->showLoading(Ljava/lang/String;ZZ)V
.line 170
new-instance v3, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment$1;
invoke-direct {v3, p0, p1}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment$1;-><init>(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;Ljava/lang/String;)V
sget-object v4, Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchType;->NEWS:Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchType;
iget-object v5, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->sortingType:Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchSortingType;
iget v7, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->currentPage:I
const/16 v8, 0xa
move-object v6, p1
invoke-static/range {v3 .. v8}, Ltr/com/hurriyet/androidsdk/HurriyetSDK;->search(Ltr/com/hurriyet/androidsdk/callback/SearchCallback;Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchType;Ltr/com/hurriyet/androidsdk/request/SearchRequest$SearchSortingType;Ljava/lang/String;II)Lretrofit2/Call;
return-void
.end method
.method public static newInstance()Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;
.registers 1
.line 133
new-instance v0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;
invoke-direct {v0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;-><init>()V
return-object v0
.end method
# virtual methods
.method afterTextChanged(Landroid/text/Editable;)V
.registers 4
.line 79
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredList:Ljava/util/List;
if-eqz v0, :cond_a
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
if-nez v0, :cond_11
.line 80
:cond_a
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->sortBtn:Lhurriyet/mobil/android/hurriyet/views/HurriyetTextView;
const/16 v1, 0x8
invoke-virtual {v0, v1}, Lhurriyet/mobil/android/hurriyet/views/HurriyetTextView;->setVisibility(I)V
.line 83
:cond_11
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result p1
const/4 v0, 0x0
if-lez p1, :cond_29
.line 84
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchEt:Landroid/widget/EditText;
const v1, 0x7f0800b3
invoke-virtual {p1, v0, v0, v1, v0}, Landroid/widget/EditText;->setCompoundDrawablesWithIntrinsicBounds(IIII)V
goto :goto_31
.line 86
:cond_29
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchEt:Landroid/widget/EditText;
const v1, 0x7f08014b
invoke-virtual {p1, v1, v0, v0, v0}, Landroid/widget/EditText;->setCompoundDrawablesWithIntrinsicBounds(IIII)V
:goto_31
return-void
.end method
.method public authorsShowMoreClicked()V
.registers 4
.line 258
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->pageController:Lhurriyet/mobil/android/hurriyet/HurriyetPageController;
new-instance v1, Lhurriyet/mobil/android/hurriyet/datatransferobjects/SearchAllAuthorsFragmentData;
iget-object v2, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredAuthorList:Ljava/util/List;
invoke-direct {v1, v2}, Lhurriyet/mobil/android/hurriyet/datatransferobjects/SearchAllAuthorsFragmentData;-><init>(Ljava/util/List;)V
invoke-interface {v0, v1}, Lhurriyet/mobil/android/hurriyet/HurriyetPageController;->launchSearchAllAuthors(Lhurriyet/mobil/android/hurriyet/datatransferobjects/SearchAllAuthorsFragmentData;)V
return-void
.end method
.method public getAuthorsFromApi()V
.registers 3
.line 262
invoke-static {}, Lhurriyet/mobil/android/hurriyet/utils/SharedPreferencesHelper;->getDeviceID()Ljava/lang/String;
move-result-object v0
new-instance v1, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment$2;
invoke-direct {v1, p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment$2;-><init>(Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;)V
invoke-static {v0, v1}, Ltr/com/hurriyet/androidsdk/HurriyetSDK;->getAuthors(Ljava/lang/String;Ltr/com/hurriyet/androidsdk/callback/AuthorsCallback;)Lretrofit2/Call;
move-result-object v0
invoke-virtual {p0, v0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->addRequestCall(Lretrofit2/Call;)V
return-void
.end method
.method protected getConfigurationsForFragment(Lcom/appcore/configuration/ConfigurationsForFragment;)V
.registers 3
.line 138
invoke-super {p0, p1}, Lhurriyet/mobil/android/hurriyet/fragments/BaseFragment;->getConfigurationsForFragment(Lcom/appcore/configuration/ConfigurationsForFragment;)V
const v0, 0x7f0c006e
.line 139
iput v0, p1, Lcom/appcore/configuration/ConfigurationsForFragment;->layoutID:I
return-void
.end method
.method protected isTabVisible()Z
.registers 2
const/4 v0, 0x0
return v0
.end method
.method public newsShowMoreClicked()V
.registers 2
const-string v0, "newsShowMoreClicked"
.line 251
invoke-static {v0, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 252
iget v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->currentPage:I
add-int/lit8 v0, v0, 0x1
iput v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->currentPage:I
.line 253
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchEt:Landroid/widget/EditText;
invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p0, v0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getData(Ljava/lang/String;)V
return-void
.end method
.method onBackTVClicked(Landroid/view/View;)V
.registers 2
.annotation runtime Lbutterknife/OnClick;
value = {
0x7f090179
}
.end annotation
.line 69
invoke-virtual {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->goBackToPreviousPage()V
return-void
.end method
.method public onPause()V
.registers 2
.line 290
invoke-super {p0}, Lhurriyet/mobil/android/hurriyet/fragments/BaseFragment;->onPause()V
.line 291
invoke-virtual {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object v0
invoke-static {v0}, Lcom/appcore/utils/helpers/AppHelpers;->hideSoftKeyboard(Landroid/app/Activity;)V
return-void
.end method
.method onTouchListener(Landroid/view/View;Landroid/view/MotionEvent;)Z
.registers 4
.annotation runtime Lbutterknife/OnTouch;
value = {
0x7f09017a
}
.end annotation
.line 92
invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F
move-result p2
invoke-virtual {p1}, Landroid/view/View;->getWidth()I
move-result v0
invoke-virtual {p1}, Landroid/view/View;->getWidth()I
move-result p1
div-int/lit8 p1, p1, 0x6
sub-int/2addr v0, p1
int-to-float p1, v0
const/4 v0, 0x0
cmpl-float p1, p2, p1
if-lez p1, :cond_32
.line 93
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchEt:Landroid/widget/EditText;
const-string p2, ""
invoke-virtual {p1, p2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
.line 94
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->noResultView:Landroid/widget/LinearLayout;
const/16 p2, 0x8
invoke-virtual {p1, p2}, Landroid/widget/LinearLayout;->setVisibility(I)V
.line 95
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p1, v0}, Landroidx/recyclerview/widget/RecyclerView;->setVisibility(I)V
.line 96
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredList:Ljava/util/List;
invoke-interface {p1}, Ljava/util/List;->clear()V
.line 97
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mSearchAdapter:Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;
invoke-virtual {p1}, Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;->notifyDataSetChanged()V
:cond_32
return v0
.end method
.method public onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
.registers 5
.line 144
invoke-super {p0, p1, p2}, Lhurriyet/mobil/android/hurriyet/fragments/BaseFragment;->onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
.line 147
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object p1
invoke-virtual {p1}, Lhurriyet/mobil/android/hurriyet/HApp;->getAllAuthors()Ljava/util/ArrayList;
move-result-object p1
if-eqz p1, :cond_1b
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getH()Lhurriyet/mobil/android/hurriyet/HApp;
move-result-object p1
invoke-virtual {p1}, Lhurriyet/mobil/android/hurriyet/HApp;->getAllAuthors()Ljava/util/ArrayList;
move-result-object p1
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result p1
if-nez p1, :cond_1e
.line 148
:cond_1b
invoke-virtual {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getAuthorsFromApi()V
.line 152
:cond_1e
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredList:Ljava/util/List;
invoke-interface {p1}, Ljava/util/List;->size()I
move-result p1
const/4 p2, 0x1
if-nez p1, :cond_43
.line 153
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchEt:Landroid/widget/EditText;
invoke-virtual {p1}, Landroid/widget/EditText;->requestFocus()Z
.line 154
invoke-virtual {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
move-result-object p1
const-string v0, "input_method"
invoke-virtual {p1, v0}, Landroidx/fragment/app/FragmentActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Landroid/view/inputmethod/InputMethodManager;
const/4 v0, 0x2
.line 155
invoke-virtual {p1, v0, p2}, Landroid/view/inputmethod/InputMethodManager;->toggleSoftInput(II)V
.line 157
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->sortBtn:Lhurriyet/mobil/android/hurriyet/views/HurriyetTextView;
const/16 v0, 0x8
invoke-virtual {p1, v0}, Lhurriyet/mobil/android/hurriyet/views/HurriyetTextView;->setVisibility(I)V
.line 160
:cond_43
new-instance p1, Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getContext()Landroid/content/Context;
move-result-object v0
invoke-direct {p1, v0}, Landroidx/recyclerview/widget/LinearLayoutManager;-><init>(Landroid/content/Context;)V
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mLinearLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
.line 161
invoke-virtual {p1, p2}, Landroidx/recyclerview/widget/LinearLayoutManager;->setOrientation(I)V
.line 162
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
iget-object p2, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mLinearLayoutManager:Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {p1, p2}, Landroidx/recyclerview/widget/RecyclerView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V
.line 163
new-instance p1, Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;
invoke-virtual {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getContext()Landroid/content/Context;
move-result-object p2
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->pageController:Lhurriyet/mobil/android/hurriyet/HurriyetPageController;
iget-object v1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->filteredList:Ljava/util/List;
invoke-direct {p1, p2, v0, v1, p0}, Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;-><init>(Landroid/content/Context;Lhurriyet/mobil/android/hurriyet/HurriyetPageController;Ljava/util/List;Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter$SearchAdapterInterface;)V
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mSearchAdapter:Lhurriyet/mobil/android/hurriyet/adapters/SearchAdapter;
.line 164
iget-object p2, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p2, p1}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
return-void
.end method
.method searchBtnTabbed(I)Z
.registers 4
.annotation runtime Lbutterknife/OnEditorAction;
value = {
0x7f09017a
}
.end annotation
const/4 v0, 0x0
const/4 v1, 0x3
if-ne v1, p1, :cond_2d
.line 106
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p1, v0}, Landroidx/recyclerview/widget/RecyclerView;->setVisibility(I)V
.line 107
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->noResultView:Landroid/widget/LinearLayout;
const/16 v0, 0x8
invoke-virtual {p1, v0}, Landroid/widget/LinearLayout;->setVisibility(I)V
const/4 p1, 0x1
.line 108
iput p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->currentPage:I
.line 109
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchEt:Landroid/widget/EditText;
invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchedText:Ljava/lang/String;
.line 110
iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->searchEt:Landroid/widget/EditText;
invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p0, v0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->getData(Ljava/lang/String;)V
return p1
:cond_2d
return v0
.end method
.method sortBtnClicked(Landroid/view/View;)V
.registers 2
.annotation runtime Lbutterknife/OnClick;
value = {
0x7f09017d
}
.end annotation
.line 122
invoke-direct {p0}, Lhurriyet/mobil/android/hurriyet/fragments/SearchFragment;->chooseSortType()V
return-void
.end method