QuizBottamFragment.smali
.class public Lcom/yctpublication/mastes/home/QuizBottamFragment;
.super Landroidx/fragment/app/Fragment;
.source "QuizBottamFragment.java"
# interfaces
.implements Lcom/yctpublication/mastes/ebook/adapter/CategoryTypeListAdapter$AdapterCallbackEbookBottam;
# instance fields
.field private categoryTypeListAdapter:Lcom/yctpublication/mastes/ebook/adapter/CategoryTypeListAdapter;
.field gridLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;
.field lAll:Landroid/widget/LinearLayout;
.field masterCategoryModelList:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Lcom/yctpublication/mastes/models/MasterCategoryModel;",
">;"
}
.end annotation
.end field
.field quizAdapter:Lcom/yctpublication/mastes/home/adapters/QuizAdapter;
.field quizModelList:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList<",
"Lcom/yctpublication/mastes/models/QuizModel;",
">;"
}
.end annotation
.end field
.field quiz_list:Landroidx/recyclerview/widget/RecyclerView;
.field recyclerViewCat:Landroidx/recyclerview/widget/RecyclerView;
.field swipeRefreshLayout:Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;
.field tvQuizSearch:Landroid/widget/EditText;
.field view:Landroid/view/View;
# direct methods
.method public constructor <init>()V
.registers 1
.line 62
invoke-direct {p0}, Landroidx/fragment/app/Fragment;-><init>()V
return-void
.end method
.method static synthetic access$000(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
.registers 1
.line 48
invoke-direct {p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getQuizzes()V
return-void
.end method
.method static synthetic access$100(Lcom/yctpublication/mastes/home/QuizBottamFragment;)Lcom/yctpublication/mastes/ebook/adapter/CategoryTypeListAdapter;
.registers 1
.line 48
iget-object p0, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->categoryTypeListAdapter:Lcom/yctpublication/mastes/ebook/adapter/CategoryTypeListAdapter;
return-object p0
.end method
.method static synthetic access$102(Lcom/yctpublication/mastes/home/QuizBottamFragment;Lcom/yctpublication/mastes/ebook/adapter/CategoryTypeListAdapter;)Lcom/yctpublication/mastes/ebook/adapter/CategoryTypeListAdapter;
.registers 2
.line 48
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->categoryTypeListAdapter:Lcom/yctpublication/mastes/ebook/adapter/CategoryTypeListAdapter;
return-object p1
.end method
.method private getMasterCategory()V
.registers 7
.line 205
invoke-virtual {p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/android/volley/toolbox/Volley;->newRequestQueue(Landroid/content/Context;)Lcom/android/volley/RequestQueue;
move-result-object v0
.line 206
new-instance v1, Lcom/android/volley/toolbox/StringRequest;
new-instance v2, Lcom/yctpublication/mastes/home/QuizBottamFragment$6;
invoke-direct {v2, p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment$6;-><init>(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
new-instance v3, Lcom/yctpublication/mastes/home/QuizBottamFragment$7;
invoke-direct {v3, p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment$7;-><init>(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
const/4 v4, 0x1
const-string v5, "https://yctpublication.com/master/api/QuizController/getCategory"
invoke-direct {v1, v4, v5, v2, v3}, Lcom/android/volley/toolbox/StringRequest;-><init>(ILjava/lang/String;Lcom/android/volley/Response$Listener;Lcom/android/volley/Response$ErrorListener;)V
.line 246
invoke-virtual {v0, v1}, Lcom/android/volley/RequestQueue;->add(Lcom/android/volley/Request;)Lcom/android/volley/Request;
return-void
.end method
.method private getQuizzes()V
.registers 7
.line 159
invoke-virtual {p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/yctpublication/mastes/common/LibraryFunctions;->isNetworkConnected(Landroid/content/Context;)Z
move-result v0
if-eqz v0, :cond_32
.line 160
iget-object v0, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->swipeRefreshLayout:Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;->setRefreshing(Z)V
.line 161
iget-object v0, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->quizModelList:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 162
invoke-virtual {p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/android/volley/toolbox/Volley;->newRequestQueue(Landroid/content/Context;)Lcom/android/volley/RequestQueue;
move-result-object v0
.line 163
new-instance v2, Lcom/android/volley/toolbox/StringRequest;
new-instance v3, Lcom/yctpublication/mastes/home/QuizBottamFragment$4;
invoke-direct {v3, p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment$4;-><init>(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
new-instance v4, Lcom/yctpublication/mastes/home/QuizBottamFragment$5;
invoke-direct {v4, p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment$5;-><init>(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
const-string v5, "https://yctpublication.com/master/api/QuizController/quizlist"
invoke-direct {v2, v1, v5, v3, v4}, Lcom/android/volley/toolbox/StringRequest;-><init>(ILjava/lang/String;Lcom/android/volley/Response$Listener;Lcom/android/volley/Response$ErrorListener;)V
.line 198
invoke-virtual {v0, v2}, Lcom/android/volley/RequestQueue;->add(Lcom/android/volley/Request;)Lcom/android/volley/Request;
goto :goto_45
.line 200
:cond_32
invoke-virtual {p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getContext()Landroid/content/Context;
move-result-object v0
const v1, 0x7f12007b
invoke-virtual {p0, v1}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getString(I)Ljava/lang/String;
move-result-object v1
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
:goto_45
return-void
.end method
# virtual methods
.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
.registers 5
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0
}
names = {
"inflater",
"container",
"savedInstanceState"
}
.end annotation
const p3, 0x7f0c007d
const/4 v0, 0x0
.line 68
invoke-virtual {p1, p3, p2, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
move-result-object p1
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->view:Landroid/view/View;
.line 70
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->quizModelList:Ljava/util/ArrayList;
.line 71
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->masterCategoryModelList:Ljava/util/ArrayList;
.line 75
iget-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->view:Landroid/view/View;
const p2, 0x7f0901a3
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p1
check-cast p1, Landroid/widget/LinearLayout;
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->lAll:Landroid/widget/LinearLayout;
.line 76
iget-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->view:Landroid/view/View;
const p2, 0x7f09038f
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p1
check-cast p1, Landroid/widget/EditText;
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->tvQuizSearch:Landroid/widget/EditText;
.line 78
iget-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->view:Landroid/view/View;
const p2, 0x7f090286
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p1
check-cast p1, Landroidx/recyclerview/widget/RecyclerView;
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->quiz_list:Landroidx/recyclerview/widget/RecyclerView;
.line 79
iget-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->view:Landroid/view/View;
const p2, 0x7f090318
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p1
check-cast p1, Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->swipeRefreshLayout:Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;
.line 81
iget-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->view:Landroid/view/View;
const p2, 0x7f0902aa
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object p1
check-cast p1, Landroidx/recyclerview/widget/RecyclerView;
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->recyclerViewCat:Landroidx/recyclerview/widget/RecyclerView;
.line 84
new-instance p1, Landroidx/recyclerview/widget/GridLayoutManager;
invoke-virtual {p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getContext()Landroid/content/Context;
move-result-object p2
const/4 p3, 0x1
invoke-direct {p1, p2, p3}, Landroidx/recyclerview/widget/GridLayoutManager;-><init>(Landroid/content/Context;I)V
iput-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->gridLayoutManager:Landroidx/recyclerview/widget/GridLayoutManager;
.line 85
iget-object p2, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->quiz_list:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p2, p1}, Landroidx/recyclerview/widget/RecyclerView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V
.line 86
new-instance p1, Landroidx/recyclerview/widget/LinearLayoutManager;
invoke-virtual {p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getContext()Landroid/content/Context;
move-result-object p2
invoke-direct {p1, p2}, Landroidx/recyclerview/widget/LinearLayoutManager;-><init>(Landroid/content/Context;)V
.line 89
invoke-virtual {p1, v0}, Landroidx/recyclerview/widget/LinearLayoutManager;->setOrientation(I)V
.line 90
iget-object p2, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->recyclerViewCat:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p2, p1}, Landroidx/recyclerview/widget/RecyclerView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V
.line 94
invoke-direct {p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getMasterCategory()V
.line 97
iget-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->swipeRefreshLayout:Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;
new-instance p2, Lcom/yctpublication/mastes/home/QuizBottamFragment$1;
invoke-direct {p2, p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment$1;-><init>(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
invoke-virtual {p1, p2}, Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;->setOnRefreshListener(Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout$OnRefreshListener;)V
.line 104
iget-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->lAll:Landroid/widget/LinearLayout;
new-instance p2, Lcom/yctpublication/mastes/home/QuizBottamFragment$2;
invoke-direct {p2, p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment$2;-><init>(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
invoke-virtual {p1, p2}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 111
iget-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->tvQuizSearch:Landroid/widget/EditText;
new-instance p2, Lcom/yctpublication/mastes/home/QuizBottamFragment$3;
invoke-direct {p2, p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment$3;-><init>(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
invoke-virtual {p1, p2}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V
.line 155
iget-object p1, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->view:Landroid/view/View;
return-object p1
.end method
.method public onMethodCallbackEbookBottam(I)V
.registers 7
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"position"
}
.end annotation
.line 252
iget-object v0, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->masterCategoryModelList:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object p1
check-cast p1, Lcom/yctpublication/mastes/models/MasterCategoryModel;
.line 253
iget-object v0, p0, Lcom/yctpublication/mastes/home/QuizBottamFragment;->quizModelList:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 257
invoke-virtual {p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment;->getContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/android/volley/toolbox/Volley;->newRequestQueue(Landroid/content/Context;)Lcom/android/volley/RequestQueue;
move-result-object v0
.line 258
new-instance v1, Lcom/android/volley/toolbox/StringRequest;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "https://yctpublication.com/master/api/QuizController/getquiz?catid="
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {p1}, Lcom/yctpublication/mastes/models/MasterCategoryModel;->getId()Ljava/lang/String;
move-result-object p1
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance v2, Lcom/yctpublication/mastes/home/QuizBottamFragment$8;
invoke-direct {v2, p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment$8;-><init>(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
new-instance v3, Lcom/yctpublication/mastes/home/QuizBottamFragment$9;
invoke-direct {v3, p0}, Lcom/yctpublication/mastes/home/QuizBottamFragment$9;-><init>(Lcom/yctpublication/mastes/home/QuizBottamFragment;)V
const/4 v4, 0x1
invoke-direct {v1, v4, p1, v2, v3}, Lcom/android/volley/toolbox/StringRequest;-><init>(ILjava/lang/String;Lcom/android/volley/Response$Listener;Lcom/android/volley/Response$ErrorListener;)V
.line 307
invoke-virtual {v0, v1}, Lcom/android/volley/RequestQueue;->add(Lcom/android/volley/Request;)Lcom/android/volley/Request;
return-void
.end method