From 6d5df6250d4c060840b64d7441525f85146fb87b Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Tue, 2 Mar 2021 11:15:56 +0100 Subject: Building the basic files to display the searched mangas. --- app/src/main/res/values/strings.xml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/src/main/res/values/strings.xml') diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bb9520a..87630b3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -35,5 +35,7 @@ https://myanimelist.net/media/id/name "Episodes " 0000 + Search Manga Page + Search Manga \ No newline at end of file -- cgit v1.2.3 From 81a89af9aa3c35a991eced93eeaa5066804e3ee5 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Tue, 2 Mar 2021 12:05:27 +0100 Subject: Search working for mangas. --- .../adjutor/aniki/manga/search/SearchMangaPage.kt | 28 +++++---------------- app/src/main/res/layout/search_manga_page.xml | 29 +++++++++++++++++----- app/src/main/res/values/strings.xml | 1 + 3 files changed, 30 insertions(+), 28 deletions(-) (limited to 'app/src/main/res/values/strings.xml') diff --git a/app/src/main/java/xyz/adjutor/aniki/manga/search/SearchMangaPage.kt b/app/src/main/java/xyz/adjutor/aniki/manga/search/SearchMangaPage.kt index 6310dfc..40f9633 100644 --- a/app/src/main/java/xyz/adjutor/aniki/manga/search/SearchMangaPage.kt +++ b/app/src/main/java/xyz/adjutor/aniki/manga/search/SearchMangaPage.kt @@ -1,7 +1,5 @@ package xyz.adjutor.aniki.manga.search -import android.content.Context -import android.content.SharedPreferences import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -11,8 +9,8 @@ import androidx.fragment.app.Fragment import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import com.google.android.material.snackbar.Snackbar +import com.google.android.material.textfield.TextInputEditText import com.google.gson.Gson import com.google.gson.GsonBuilder import retrofit2.Call @@ -24,7 +22,6 @@ import xyz.adjutor.aniki.R class SearchMangaPage : Fragment() { - private lateinit var sharedPreferences: SharedPreferences val gson: Gson = GsonBuilder() .setLenient() .create() @@ -37,11 +34,6 @@ class SearchMangaPage : Fragment() { // Inflate the layout for this fragment val view = inflater.inflate(R.layout.search_manga_page, container, false) - sharedPreferences = view.context.getSharedPreferences("sp_manga", Context.MODE_PRIVATE) - - - makeApiCall(view, baseUrl) - return view } @@ -54,18 +46,10 @@ class SearchMangaPage : Fragment() { findNavController().navigate(R.id.action_SearchMangaPage_to_HomePage) } - fun updateList() { - makeApiCall(view, baseUrl) - Snackbar.make(requireView(), "Data refreshed", Snackbar.LENGTH_LONG) - .setAction("Action", null).show() + view.findViewById