From 9159505004b7d55964653747decd313bcdd6a801 Mon Sep 17 00:00:00 2001 From: Clyhtsuriva Date: Tue, 23 Mar 2021 09:09:40 +0100 Subject: Manga : Added a search button replacing return on the keyboard. --- README.md | 25 ++++++++++---------- .../adjutor/aniki/manga/search/SearchMangaPage.kt | 27 ++++++++++++++++++++-- app/src/main/res/layout/search_manga_page.xml | 2 ++ 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 49b81f2..fc717f0 100644 --- a/README.md +++ b/README.md @@ -8,26 +8,27 @@ URL link openable. Search pages for animes and mangas. They display the data in a recycler view similar to the tops. A feature has been added that hides the keyboard when the query is submitted by the user. +We can also submit the query by clicking the "search" button that replace the "return" one. Multiple calls of the REST API from jikan.moe. Usage of : -/v3/top/manga -/v3/top/anime -/v3/manga -/v3/anime -/v3/search/manga -/v3/search/anime ++ /v3/top/manga ++ /v3/top/anime ++ /v3/manga ++ /v3/anime ++ /v3/search/manga ++ /v3/search/anime Data storage with sharedpreferences used for the recycler view of top manga and top anime as well as the details Saves the detail page of an item when opened, not when the list is shown Usage of ScrollView in the detail page. Thus, items with long synopsis and background aren't cut down. Used my "personal" theme colors for the app. -It consists of colors of the pink/purple "family" : -very dark purple : #09022A -very light magenta : #FF70FF -strong pink : #D52C70 -slightly desaturated magenta : #C583B6 -grayish magenta : #C9A6C9 +It consists of some colors of the pink/purple "family" : ++ very dark purple : #09022A ++ very light magenta : #FF70FF ++ strong pink : #D52C70 ++ slightly desaturated magenta : #C583B6 ++ grayish magenta : #C9A6C9 Development done with a Gitflow workflow. 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 f79db36..7866151 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 @@ -5,8 +5,11 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.view.inputmethod.EditorInfo import android.view.inputmethod.InputMethodManager import android.widget.Button +import android.widget.EditText +import android.widget.TextView.OnEditorActionListener import androidx.fragment.app.Fragment import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.LinearLayoutManager @@ -23,6 +26,7 @@ import retrofit2.converter.gson.GsonConverterFactory import xyz.adjutor.aniki.MainActivity import xyz.adjutor.aniki.R + class SearchMangaPage : Fragment() { val gson: Gson = GsonBuilder() @@ -48,11 +52,24 @@ class SearchMangaPage : Fragment() { findNavController().navigate(R.id.action_SearchMangaPage_to_HomePage) } - view.findViewById