mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Working on search history
This commit is contained in:
parent
e0dd45765d
commit
cd67d4291c
@ -11,13 +11,15 @@ import android.view.ViewGroup
|
|||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.AdapterView
|
|
||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
import android.widget.AutoCompleteTextView
|
import android.widget.AutoCompleteTextView
|
||||||
import android.widget.TextView.OnEditorActionListener
|
import android.widget.TextView
|
||||||
|
import android.widget.TextView.*
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.preference.PreferenceManager
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.github.libretube.adapters.SearchAdapter
|
import com.github.libretube.adapters.SearchAdapter
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
@ -48,6 +50,21 @@ class SearchFragment : Fragment() {
|
|||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
val recyclerView = view.findViewById<RecyclerView>(R.id.search_recycler)
|
val recyclerView = view.findViewById<RecyclerView>(R.id.search_recycler)
|
||||||
|
|
||||||
|
val historyRecycler = view.findViewById<RecyclerView>(R.id.history_recycler)
|
||||||
|
val history_tv = view.findViewById<TextView>(R.id.tv_history)
|
||||||
|
|
||||||
|
|
||||||
|
//show search history
|
||||||
|
|
||||||
|
recyclerView.visibility = GONE
|
||||||
|
historyRecycler.visibility = VISIBLE
|
||||||
|
history_tv.visibility = VISIBLE
|
||||||
|
|
||||||
|
recyclerView.layoutManager = LinearLayoutManager(view.context)
|
||||||
|
recyclerView.adapter
|
||||||
|
|
||||||
|
|
||||||
recyclerView.layoutManager = GridLayoutManager(view.context, 1)
|
recyclerView.layoutManager = GridLayoutManager(view.context, 1)
|
||||||
val autoTextView = view.findViewById<AutoCompleteTextView>(R.id.autoCompleteTextView)
|
val autoTextView = view.findViewById<AutoCompleteTextView>(R.id.autoCompleteTextView)
|
||||||
autoTextView.requestFocus()
|
autoTextView.requestFocus()
|
||||||
@ -68,6 +85,7 @@ class SearchFragment : Fragment() {
|
|||||||
GlobalScope.launch {
|
GlobalScope.launch {
|
||||||
fetchSuggestions(s.toString(), autoTextView)
|
fetchSuggestions(s.toString(), autoTextView)
|
||||||
delay(3000)
|
delay(3000)
|
||||||
|
addtohistory(s.toString())
|
||||||
fetchSearch(s.toString(),recyclerView)
|
fetchSearch(s.toString(),recyclerView)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -143,4 +161,21 @@ class SearchFragment : Fragment() {
|
|||||||
super.onStop()
|
super.onStop()
|
||||||
hideKeyboard()
|
hideKeyboard()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun addtohistory(query: String) {
|
||||||
|
var queryFromated = "|" + query
|
||||||
|
|
||||||
|
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
|
||||||
|
|
||||||
|
var history = sharedPreferences.getString("search_history", "")
|
||||||
|
|
||||||
|
var splited_history = history!!.split("|") + queryFromated
|
||||||
|
|
||||||
|
if (splited_history.size > 10) {
|
||||||
|
splited_history.drop(9)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sharedPreferences.edit().putString("search_history",splited_history.joinToString("|") ).apply()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.github.libretube.adapters
|
||||||
|
|
||||||
|
class SearchHistoryAdapter {
|
||||||
|
}
|
@ -4,39 +4,37 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".SearchFragment"
|
tools:context=".SearchFragment">
|
||||||
>
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/outlinedTextField"
|
android:id="@+id/outlinedTextField"
|
||||||
style="@style/Widget.Material3.CardView.Filled"
|
style="@style/Widget.Material3.CardView.Filled"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:layout_width="match_parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
app:cardCornerRadius="27dp"
|
app:cardCornerRadius="27dp"
|
||||||
>
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:hintEnabled="false"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
>
|
app:hintEnabled="false">
|
||||||
|
|
||||||
<AutoCompleteTextView
|
<AutoCompleteTextView
|
||||||
android:id="@+id/autoCompleteTextView"
|
android:id="@+id/autoCompleteTextView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
android:hint="Search"
|
android:hint="Search"
|
||||||
android:imeOptions="actionSearch"
|
android:imeOptions="actionSearch"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:padding="12dp" />
|
android:padding="12dp" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
@ -44,239 +42,263 @@
|
|||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
|
||||||
<!-- <TextView-->
|
<!-- <TextView-->
|
||||||
<!-- android:id="@+id/tv_genres"-->
|
<!-- android:id="@+id/tv_genres"-->
|
||||||
<!-- android:layout_width="wrap_content"-->
|
<!-- android:layout_width="wrap_content"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_margin="25dp"-->
|
<!-- android:layout_margin="25dp"-->
|
||||||
<!-- android:text="Explore different genres"-->
|
<!-- android:text="Explore different genres"-->
|
||||||
<!-- android:textSize="16sp"-->
|
<!-- android:textSize="16sp"-->
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
<!-- app:layout_constraintTop_toBottomOf="@+id/outlinedTextField" />-->
|
<!-- app:layout_constraintTop_toBottomOf="@+id/outlinedTextField" />-->
|
||||||
|
|
||||||
<!-- <LinearLayout-->
|
<!-- <LinearLayout-->
|
||||||
<!-- android:id="@+id/genres"-->
|
<!-- android:id="@+id/genres"-->
|
||||||
<!-- android:layout_width="match_parent"-->
|
<!-- android:layout_width="match_parent"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_marginLeft="10dp"-->
|
<!-- android:layout_marginLeft="10dp"-->
|
||||||
<!-- android:layout_marginTop="30dp"-->
|
<!-- android:layout_marginTop="30dp"-->
|
||||||
<!-- android:layout_marginRight="10dp"-->
|
<!-- android:layout_marginRight="10dp"-->
|
||||||
<!-- android:orientation="horizontal"-->
|
<!-- android:orientation="horizontal"-->
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
<!-- app:layout_constraintTop_toBottomOf="@id/tv_genres">-->
|
<!-- app:layout_constraintTop_toBottomOf="@id/tv_genres">-->
|
||||||
|
|
||||||
<!-- <com.google.android.material.card.MaterialCardView-->
|
<!-- <com.google.android.material.card.MaterialCardView-->
|
||||||
<!-- android:id="@+id/btn_trending"-->
|
<!-- android:id="@+id/btn_trending"-->
|
||||||
<!-- android:layout_width="0dp"-->
|
<!-- android:layout_width="0dp"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_marginLeft="20dp"-->
|
<!-- android:layout_marginLeft="20dp"-->
|
||||||
<!-- android:layout_marginRight="20dp"-->
|
<!-- android:layout_marginRight="20dp"-->
|
||||||
<!-- android:layout_weight=".5"-->
|
<!-- android:layout_weight=".5"-->
|
||||||
<!-- android:background="@android:color/transparent"-->
|
<!-- android:background="@android:color/transparent"-->
|
||||||
<!-- app:cardBackgroundColor="@android:color/transparent"-->
|
<!-- app:cardBackgroundColor="@android:color/transparent"-->
|
||||||
<!-- app:strokeWidth="0dp">-->
|
<!-- app:strokeWidth="0dp">-->
|
||||||
|
|
||||||
<!-- <RelativeLayout-->
|
<!-- <RelativeLayout-->
|
||||||
<!-- android:layout_width="match_parent"-->
|
<!-- android:layout_width="match_parent"-->
|
||||||
<!-- android:layout_height="match_parent"-->
|
<!-- android:layout_height="match_parent"-->
|
||||||
<!-- android:orientation="horizontal">-->
|
<!-- android:orientation="horizontal">-->
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<!-- <ImageView-->
|
||||||
<!-- android:id="@+id/iv_ic"-->
|
<!-- android:id="@+id/iv_ic"-->
|
||||||
<!-- android:layout_width="25dp"-->
|
<!-- android:layout_width="25dp"-->
|
||||||
<!-- android:layout_height="25dp"-->
|
<!-- android:layout_height="25dp"-->
|
||||||
<!-- android:layout_alignParentLeft="true"-->
|
<!-- android:layout_alignParentLeft="true"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:layout_marginStart="5dp"-->
|
<!-- android:layout_marginStart="5dp"-->
|
||||||
<!-- android:layout_marginTop="5dp"-->
|
<!-- android:layout_marginTop="5dp"-->
|
||||||
<!-- android:layout_marginEnd="5dp"-->
|
<!-- android:layout_marginEnd="5dp"-->
|
||||||
<!-- android:layout_marginBottom="5dp"-->
|
<!-- android:layout_marginBottom="5dp"-->
|
||||||
<!-- android:src="@drawable/ic_hot" />-->
|
<!-- android:src="@drawable/ic_hot" />-->
|
||||||
|
|
||||||
<!-- <TextView-->
|
<!-- <TextView-->
|
||||||
<!-- android:layout_width="wrap_content"-->
|
<!-- android:layout_width="wrap_content"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:layout_marginLeft="7dp"-->
|
<!-- android:layout_marginLeft="7dp"-->
|
||||||
<!-- android:layout_toRightOf="@id/iv_ic"-->
|
<!-- android:layout_toRightOf="@id/iv_ic"-->
|
||||||
<!-- android:text="@string/trending"-->
|
<!-- android:text="@string/trending"-->
|
||||||
<!-- android:textSize="16sp" />-->
|
<!-- android:textSize="16sp" />-->
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<!-- <ImageView-->
|
||||||
<!-- android:layout_width="10dp"-->
|
<!-- android:layout_width="10dp"-->
|
||||||
<!-- android:layout_height="10dp"-->
|
<!-- android:layout_height="10dp"-->
|
||||||
<!-- android:layout_alignParentRight="true"-->
|
<!-- android:layout_alignParentRight="true"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:src="@drawable/ic_arrow" />-->
|
<!-- android:src="@drawable/ic_arrow" />-->
|
||||||
|
|
||||||
<!-- </RelativeLayout>-->
|
<!-- </RelativeLayout>-->
|
||||||
|
|
||||||
|
|
||||||
<!-- </com.google.android.material.card.MaterialCardView>-->
|
<!-- </com.google.android.material.card.MaterialCardView>-->
|
||||||
|
|
||||||
<!-- <com.google.android.material.card.MaterialCardView-->
|
<!-- <com.google.android.material.card.MaterialCardView-->
|
||||||
<!-- android:id="@+id/btn_live"-->
|
<!-- android:id="@+id/btn_live"-->
|
||||||
<!-- android:layout_width="0dp"-->
|
<!-- android:layout_width="0dp"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_marginLeft="30dp"-->
|
<!-- android:layout_marginLeft="30dp"-->
|
||||||
<!-- android:layout_marginRight="20dp"-->
|
<!-- android:layout_marginRight="20dp"-->
|
||||||
<!-- android:layout_weight=".5"-->
|
<!-- android:layout_weight=".5"-->
|
||||||
<!-- android:background="@android:color/transparent"-->
|
<!-- android:background="@android:color/transparent"-->
|
||||||
<!-- app:cardBackgroundColor="@android:color/transparent"-->
|
<!-- app:cardBackgroundColor="@android:color/transparent"-->
|
||||||
<!-- app:strokeWidth="0dp">-->
|
<!-- app:strokeWidth="0dp">-->
|
||||||
|
|
||||||
<!-- <RelativeLayout-->
|
<!-- <RelativeLayout-->
|
||||||
<!-- android:layout_width="match_parent"-->
|
<!-- android:layout_width="match_parent"-->
|
||||||
<!-- android:layout_height="match_parent"-->
|
<!-- android:layout_height="match_parent"-->
|
||||||
<!-- android:orientation="horizontal">-->
|
<!-- android:orientation="horizontal">-->
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<!-- <ImageView-->
|
||||||
<!-- android:id="@+id/iv_ic2"-->
|
<!-- android:id="@+id/iv_ic2"-->
|
||||||
<!-- android:layout_width="25dp"-->
|
<!-- android:layout_width="25dp"-->
|
||||||
<!-- android:layout_height="25dp"-->
|
<!-- android:layout_height="25dp"-->
|
||||||
<!-- android:layout_alignParentLeft="true"-->
|
<!-- android:layout_alignParentLeft="true"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:layout_marginStart="5dp"-->
|
<!-- android:layout_marginStart="5dp"-->
|
||||||
<!-- android:layout_marginTop="5dp"-->
|
<!-- android:layout_marginTop="5dp"-->
|
||||||
<!-- android:layout_marginEnd="5dp"-->
|
<!-- android:layout_marginEnd="5dp"-->
|
||||||
<!-- android:layout_marginBottom="5dp"-->
|
<!-- android:layout_marginBottom="5dp"-->
|
||||||
<!-- android:src="@drawable/ic_live" />-->
|
<!-- android:src="@drawable/ic_live" />-->
|
||||||
|
|
||||||
<!-- <TextView-->
|
<!-- <TextView-->
|
||||||
<!-- android:layout_width="wrap_content"-->
|
<!-- android:layout_width="wrap_content"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:layout_marginLeft="7dp"-->
|
<!-- android:layout_marginLeft="7dp"-->
|
||||||
<!-- android:layout_toRightOf="@id/iv_ic2"-->
|
<!-- android:layout_toRightOf="@id/iv_ic2"-->
|
||||||
<!-- android:text="@string/live"-->
|
<!-- android:text="@string/live"-->
|
||||||
<!-- android:textSize="16sp" />-->
|
<!-- android:textSize="16sp" />-->
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<!-- <ImageView-->
|
||||||
<!-- android:layout_width="10dp"-->
|
<!-- android:layout_width="10dp"-->
|
||||||
<!-- android:layout_height="10dp"-->
|
<!-- android:layout_height="10dp"-->
|
||||||
<!-- android:layout_alignParentRight="true"-->
|
<!-- android:layout_alignParentRight="true"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:src="@drawable/ic_arrow" />-->
|
<!-- android:src="@drawable/ic_arrow" />-->
|
||||||
|
|
||||||
<!-- </RelativeLayout>-->
|
<!-- </RelativeLayout>-->
|
||||||
|
|
||||||
|
|
||||||
<!-- </com.google.android.material.card.MaterialCardView>-->
|
<!-- </com.google.android.material.card.MaterialCardView>-->
|
||||||
|
|
||||||
<!-- </LinearLayout>-->
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
<!-- <LinearLayout-->
|
<!-- <LinearLayout-->
|
||||||
<!-- android:id="@+id/genres2"-->
|
<!-- android:id="@+id/genres2"-->
|
||||||
<!-- android:layout_width="match_parent"-->
|
<!-- android:layout_width="match_parent"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_marginLeft="10dp"-->
|
<!-- android:layout_marginLeft="10dp"-->
|
||||||
<!-- android:layout_marginTop="20dp"-->
|
<!-- android:layout_marginTop="20dp"-->
|
||||||
<!-- android:layout_marginRight="10dp"-->
|
<!-- android:layout_marginRight="10dp"-->
|
||||||
<!-- android:orientation="horizontal"-->
|
<!-- android:orientation="horizontal"-->
|
||||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||||
<!-- app:layout_constraintTop_toBottomOf="@id/genres">-->
|
<!-- app:layout_constraintTop_toBottomOf="@id/genres">-->
|
||||||
|
|
||||||
<!-- <com.google.android.material.card.MaterialCardView-->
|
<!-- <com.google.android.material.card.MaterialCardView-->
|
||||||
<!-- android:id="@+id/btn_music"-->
|
<!-- android:id="@+id/btn_music"-->
|
||||||
<!-- android:layout_width="0dp"-->
|
<!-- android:layout_width="0dp"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_marginLeft="20dp"-->
|
<!-- android:layout_marginLeft="20dp"-->
|
||||||
<!-- android:layout_marginRight="20dp"-->
|
<!-- android:layout_marginRight="20dp"-->
|
||||||
<!-- android:layout_weight=".5"-->
|
<!-- android:layout_weight=".5"-->
|
||||||
<!-- android:background="@android:color/transparent"-->
|
<!-- android:background="@android:color/transparent"-->
|
||||||
<!-- app:cardBackgroundColor="@android:color/transparent"-->
|
<!-- app:cardBackgroundColor="@android:color/transparent"-->
|
||||||
<!-- app:strokeWidth="0dp">-->
|
<!-- app:strokeWidth="0dp">-->
|
||||||
|
|
||||||
<!-- <RelativeLayout-->
|
<!-- <RelativeLayout-->
|
||||||
<!-- android:layout_width="match_parent"-->
|
<!-- android:layout_width="match_parent"-->
|
||||||
<!-- android:layout_height="match_parent"-->
|
<!-- android:layout_height="match_parent"-->
|
||||||
<!-- android:orientation="horizontal">-->
|
<!-- android:orientation="horizontal">-->
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<!-- <ImageView-->
|
||||||
<!-- android:id="@+id/iv_ic3"-->
|
<!-- android:id="@+id/iv_ic3"-->
|
||||||
<!-- android:layout_width="25dp"-->
|
<!-- android:layout_width="25dp"-->
|
||||||
<!-- android:layout_height="25dp"-->
|
<!-- android:layout_height="25dp"-->
|
||||||
<!-- android:layout_alignParentLeft="true"-->
|
<!-- android:layout_alignParentLeft="true"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:layout_marginStart="5dp"-->
|
<!-- android:layout_marginStart="5dp"-->
|
||||||
<!-- android:layout_marginTop="5dp"-->
|
<!-- android:layout_marginTop="5dp"-->
|
||||||
<!-- android:layout_marginEnd="5dp"-->
|
<!-- android:layout_marginEnd="5dp"-->
|
||||||
<!-- android:layout_marginBottom="5dp"-->
|
<!-- android:layout_marginBottom="5dp"-->
|
||||||
<!-- android:src="@drawable/ic_music" />-->
|
<!-- android:src="@drawable/ic_music" />-->
|
||||||
|
|
||||||
<!-- <TextView-->
|
<!-- <TextView-->
|
||||||
<!-- android:layout_width="wrap_content"-->
|
<!-- android:layout_width="wrap_content"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:layout_marginLeft="7dp"-->
|
<!-- android:layout_marginLeft="7dp"-->
|
||||||
<!-- android:layout_toRightOf="@id/iv_ic3"-->
|
<!-- android:layout_toRightOf="@id/iv_ic3"-->
|
||||||
<!-- android:text="@string/music"-->
|
<!-- android:text="@string/music"-->
|
||||||
<!-- android:textSize="16sp" />-->
|
<!-- android:textSize="16sp" />-->
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<!-- <ImageView-->
|
||||||
<!-- android:layout_width="10dp"-->
|
<!-- android:layout_width="10dp"-->
|
||||||
<!-- android:layout_height="10dp"-->
|
<!-- android:layout_height="10dp"-->
|
||||||
<!-- android:layout_alignParentRight="true"-->
|
<!-- android:layout_alignParentRight="true"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:src="@drawable/ic_arrow" />-->
|
<!-- android:src="@drawable/ic_arrow" />-->
|
||||||
|
|
||||||
<!-- </RelativeLayout>-->
|
<!-- </RelativeLayout>-->
|
||||||
|
|
||||||
|
|
||||||
<!-- </com.google.android.material.card.MaterialCardView>-->
|
<!-- </com.google.android.material.card.MaterialCardView>-->
|
||||||
|
|
||||||
<!-- <com.google.android.material.card.MaterialCardView-->
|
<!-- <com.google.android.material.card.MaterialCardView-->
|
||||||
<!-- android:id="@+id/btn_films"-->
|
<!-- android:id="@+id/btn_films"-->
|
||||||
<!-- android:layout_width="0dp"-->
|
<!-- android:layout_width="0dp"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_marginLeft="30dp"-->
|
<!-- android:layout_marginLeft="30dp"-->
|
||||||
<!-- android:layout_marginRight="20dp"-->
|
<!-- android:layout_marginRight="20dp"-->
|
||||||
<!-- android:layout_weight=".5"-->
|
<!-- android:layout_weight=".5"-->
|
||||||
<!-- android:background="@android:color/transparent"-->
|
<!-- android:background="@android:color/transparent"-->
|
||||||
<!-- app:cardBackgroundColor="@android:color/transparent"-->
|
<!-- app:cardBackgroundColor="@android:color/transparent"-->
|
||||||
<!-- app:strokeWidth="0dp">-->
|
<!-- app:strokeWidth="0dp">-->
|
||||||
|
|
||||||
<!-- <RelativeLayout-->
|
<!-- <RelativeLayout-->
|
||||||
<!-- android:layout_width="match_parent"-->
|
<!-- android:layout_width="match_parent"-->
|
||||||
<!-- android:layout_height="match_parent"-->
|
<!-- android:layout_height="match_parent"-->
|
||||||
<!-- android:orientation="horizontal">-->
|
<!-- android:orientation="horizontal">-->
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<!-- <ImageView-->
|
||||||
<!-- android:id="@+id/iv_ic4"-->
|
<!-- android:id="@+id/iv_ic4"-->
|
||||||
<!-- android:layout_width="25dp"-->
|
<!-- android:layout_width="25dp"-->
|
||||||
<!-- android:layout_height="25dp"-->
|
<!-- android:layout_height="25dp"-->
|
||||||
<!-- android:layout_alignParentLeft="true"-->
|
<!-- android:layout_alignParentLeft="true"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:layout_marginStart="5dp"-->
|
<!-- android:layout_marginStart="5dp"-->
|
||||||
<!-- android:layout_marginTop="5dp"-->
|
<!-- android:layout_marginTop="5dp"-->
|
||||||
<!-- android:layout_marginEnd="5dp"-->
|
<!-- android:layout_marginEnd="5dp"-->
|
||||||
<!-- android:layout_marginBottom="5dp"-->
|
<!-- android:layout_marginBottom="5dp"-->
|
||||||
<!-- android:src="@drawable/ic_film" />-->
|
<!-- android:src="@drawable/ic_film" />-->
|
||||||
|
|
||||||
<!-- <TextView-->
|
<!-- <TextView-->
|
||||||
<!-- android:layout_width="wrap_content"-->
|
<!-- android:layout_width="wrap_content"-->
|
||||||
<!-- android:layout_height="wrap_content"-->
|
<!-- android:layout_height="wrap_content"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:layout_marginLeft="7dp"-->
|
<!-- android:layout_marginLeft="7dp"-->
|
||||||
<!-- android:layout_toRightOf="@id/iv_ic4"-->
|
<!-- android:layout_toRightOf="@id/iv_ic4"-->
|
||||||
<!-- android:text="@string/film"-->
|
<!-- android:text="@string/film"-->
|
||||||
<!-- android:textSize="16sp" />-->
|
<!-- android:textSize="16sp" />-->
|
||||||
|
|
||||||
<!-- <ImageView-->
|
<!-- <ImageView-->
|
||||||
<!-- android:layout_width="10dp"-->
|
<!-- android:layout_width="10dp"-->
|
||||||
<!-- android:layout_height="10dp"-->
|
<!-- android:layout_height="10dp"-->
|
||||||
<!-- android:layout_alignParentRight="true"-->
|
<!-- android:layout_alignParentRight="true"-->
|
||||||
<!-- android:layout_centerVertical="true"-->
|
<!-- android:layout_centerVertical="true"-->
|
||||||
<!-- android:src="@drawable/ic_arrow" />-->
|
<!-- android:src="@drawable/ic_arrow" />-->
|
||||||
|
|
||||||
<!-- </RelativeLayout>-->
|
<!-- </RelativeLayout>-->
|
||||||
|
|
||||||
|
|
||||||
<!-- </com.google.android.material.card.MaterialCardView>-->
|
<!-- </com.google.android.material.card.MaterialCardView>-->
|
||||||
|
|
||||||
<!-- </LinearLayout>-->
|
<!-- </LinearLayout>-->
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_history"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="25dp"
|
||||||
|
android:text="@string/history"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/outlinedTextField"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/history_recycler"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_history"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/search_recycler"
|
android:id="@+id/search_recycler"
|
||||||
|
@ -63,4 +63,5 @@
|
|||||||
<string name="lightTheme">Light Theme</string>
|
<string name="lightTheme">Light Theme</string>
|
||||||
<string name="darkTheme">Dark Theme</string>
|
<string name="darkTheme">Dark Theme</string>
|
||||||
<string name="subscribers">%1$s subscribers</string>
|
<string name="subscribers">%1$s subscribers</string>
|
||||||
|
<string name="history">History</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user