mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Search other extensions
This commit is contained in:
parent
e11264f58f
commit
f3efbfd45f
3 changed files with 37 additions and 1 deletions
|
@ -33,6 +33,7 @@ import com.lagradost.cloudstream3.ui.WatchType
|
||||||
import com.lagradost.cloudstream3.ui.download.DownloadButtonSetup
|
import com.lagradost.cloudstream3.ui.download.DownloadButtonSetup
|
||||||
import com.lagradost.cloudstream3.ui.player.ExtractorLinkGenerator
|
import com.lagradost.cloudstream3.ui.player.ExtractorLinkGenerator
|
||||||
import com.lagradost.cloudstream3.ui.player.GeneratorPlayer
|
import com.lagradost.cloudstream3.ui.player.GeneratorPlayer
|
||||||
|
import com.lagradost.cloudstream3.ui.quicksearch.QuickSearchFragment
|
||||||
import com.lagradost.cloudstream3.ui.result.ResultFragment.getStoredData
|
import com.lagradost.cloudstream3.ui.result.ResultFragment.getStoredData
|
||||||
import com.lagradost.cloudstream3.ui.result.ResultFragment.updateUIEvent
|
import com.lagradost.cloudstream3.ui.result.ResultFragment.updateUIEvent
|
||||||
import com.lagradost.cloudstream3.ui.search.SEARCH_ACTION_FOCUSED
|
import com.lagradost.cloudstream3.ui.search.SEARCH_ACTION_FOCUSED
|
||||||
|
@ -272,6 +273,7 @@ class ResultFragmentTv : Fragment() {
|
||||||
resultEpisodesShowButton.onFocusChangeListener = rightListener
|
resultEpisodesShowButton.onFocusChangeListener = rightListener
|
||||||
resultDescription.onFocusChangeListener = leftListener
|
resultDescription.onFocusChangeListener = leftListener
|
||||||
resultBookmarkButton.onFocusChangeListener = leftListener
|
resultBookmarkButton.onFocusChangeListener = leftListener
|
||||||
|
resultSearchButton.onFocusChangeListener = leftListener
|
||||||
resultFavoriteButton.onFocusChangeListener = leftListener
|
resultFavoriteButton.onFocusChangeListener = leftListener
|
||||||
resultEpisodesShowButton.setOnClickListener {
|
resultEpisodesShowButton.setOnClickListener {
|
||||||
// toggle, to make it more touch accessable just in case someone thinks that a
|
// toggle, to make it more touch accessable just in case someone thinks that a
|
||||||
|
@ -293,7 +295,8 @@ class ResultFragmentTv : Fragment() {
|
||||||
resultPlayTrailerButton,
|
resultPlayTrailerButton,
|
||||||
resultBookmarkButton,
|
resultBookmarkButton,
|
||||||
resultFavoriteButton,
|
resultFavoriteButton,
|
||||||
resultSubscribeButton
|
resultSubscribeButton,
|
||||||
|
resultSearchButton
|
||||||
)
|
)
|
||||||
for (requestView in views) {
|
for (requestView in views) {
|
||||||
if (!requestView.isVisible) continue
|
if (!requestView.isVisible) continue
|
||||||
|
@ -878,6 +881,10 @@ class ResultFragmentTv : Fragment() {
|
||||||
// If there is no rating to display, we don't want an empty gap
|
// If there is no rating to display, we don't want an empty gap
|
||||||
resultMetaContentRating.width = 0
|
resultMetaContentRating.width = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultSearchButton.setOnClickListener {
|
||||||
|
QuickSearchFragment.pushSearch(activity, d.title)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is Resource.Loading -> {
|
is Resource.Loading -> {
|
||||||
|
|
|
@ -465,6 +465,34 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:id="@+id/result_search"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/result_search_Button"
|
||||||
|
android:focusable="true"
|
||||||
|
style="@style/ResultSmallButtonTV"
|
||||||
|
app:iconPadding="0dp"
|
||||||
|
app:icon="@drawable/search_icon"
|
||||||
|
android:nextFocusUp="@id/result_search_Button"
|
||||||
|
android:nextFocusDown="@id/result_description"
|
||||||
|
android:tag="@string/tv_no_focus_tag">
|
||||||
|
</com.google.android.material.button.MaterialButton>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/result_search_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="top|center_horizontal"
|
||||||
|
android:minLines="2"
|
||||||
|
android:text="@string/result_search" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -748,4 +748,5 @@
|
||||||
<string name="favorite">Favorite</string>
|
<string name="favorite">Favorite</string>
|
||||||
<string name="movie">Movie</string>
|
<string name="movie">Movie</string>
|
||||||
<string name="unfavorite">Unfavorite</string>
|
<string name="unfavorite">Unfavorite</string>
|
||||||
|
<string name="result_search">Search</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue