From 2044977f956d4ed9c2ea116bcabb3fb7f12648ec Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 6 Jun 2022 16:06:53 +0200 Subject: [PATCH 1/2] floating --- app/src/main/java/com/github/libretube/Home.kt | 6 ++++++ app/src/main/res/drawable/ic_arrow_down2.xml | 10 ---------- app/src/main/res/drawable/ic_close2.xml | 11 ----------- .../drawable/{ic_wifi_off.xml => ic_no_wifi.xml} | 0 app/src/main/res/drawable/ic_search2.xml | 10 ---------- app/src/main/res/layout/activity_nointernet.xml | 2 +- .../res/layout/exo_styled_player_control_view.xml | 13 ++++++++----- app/src/main/res/layout/fragment_home.xml | 13 +++++++++++++ app/src/main/res/layout/searchhistory_row.xml | 2 +- 9 files changed, 29 insertions(+), 38 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_arrow_down2.xml delete mode 100644 app/src/main/res/drawable/ic_close2.xml rename app/src/main/res/drawable/{ic_wifi_off.xml => ic_no_wifi.xml} (100%) delete mode 100644 app/src/main/res/drawable/ic_search2.xml diff --git a/app/src/main/java/com/github/libretube/Home.kt b/app/src/main/java/com/github/libretube/Home.kt index 9c78c562a..d80034274 100644 --- a/app/src/main/java/com/github/libretube/Home.kt +++ b/app/src/main/java/com/github/libretube/Home.kt @@ -9,6 +9,7 @@ import android.widget.ProgressBar import android.widget.Toast import androidx.fragment.app.Fragment import androidx.lifecycle.lifecycleScope +import androidx.navigation.fragment.findNavController import androidx.preference.PreferenceManager import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.RecyclerView @@ -40,6 +41,11 @@ class Home : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + val searchButton = view.findViewById(R.id.search_fab) + searchButton.setOnClickListener { + findNavController().navigate(R.id.searchFragment) + } val recyclerView = view.findViewById(R.id.recview) val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext()) val grid = sharedPreferences.getString( diff --git a/app/src/main/res/drawable/ic_arrow_down2.xml b/app/src/main/res/drawable/ic_arrow_down2.xml deleted file mode 100644 index e8123164a..000000000 --- a/app/src/main/res/drawable/ic_arrow_down2.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_close2.xml b/app/src/main/res/drawable/ic_close2.xml deleted file mode 100644 index 3d79675c2..000000000 --- a/app/src/main/res/drawable/ic_close2.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_wifi_off.xml b/app/src/main/res/drawable/ic_no_wifi.xml similarity index 100% rename from app/src/main/res/drawable/ic_wifi_off.xml rename to app/src/main/res/drawable/ic_no_wifi.xml diff --git a/app/src/main/res/drawable/ic_search2.xml b/app/src/main/res/drawable/ic_search2.xml deleted file mode 100644 index 5188b2a93..000000000 --- a/app/src/main/res/drawable/ic_search2.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/app/src/main/res/layout/activity_nointernet.xml b/app/src/main/res/layout/activity_nointernet.xml index 9303bc516..69874d73e 100644 --- a/app/src/main/res/layout/activity_nointernet.xml +++ b/app/src/main/res/layout/activity_nointernet.xml @@ -22,7 +22,7 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_wifi_off" /> + app:srcCompat="@drawable/ic_no_wifi" /> - +