mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Use maxLines for description
Looks nicer in UI and is more reliable
This commit is contained in:
parent
8c2f4b7e17
commit
0d38b4b601
4 changed files with 8 additions and 19 deletions
|
@ -253,12 +253,9 @@ class EpisodeAdapter(
|
||||||
clickCallback.invoke(EpisodeClickEvent(ACTION_SHOW_DESCRIPTION, card))
|
clickCallback.invoke(EpisodeClickEvent(ACTION_SHOW_DESCRIPTION, card))
|
||||||
} else {
|
} else {
|
||||||
isExpanded = !isExpanded
|
isExpanded = !isExpanded
|
||||||
|
|
||||||
maxLines = if (isExpanded) {
|
maxLines = if (isExpanded) {
|
||||||
Integer.MAX_VALUE
|
Integer.MAX_VALUE
|
||||||
} else {
|
} else 4
|
||||||
4
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ import android.graphics.Rect
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.Editable
|
import android.text.Editable
|
||||||
import android.text.InputFilter
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -63,14 +62,12 @@ import com.lagradost.cloudstream3.ui.result.ResultFragment.updateUIEvent
|
||||||
import com.lagradost.cloudstream3.ui.search.SearchAdapter
|
import com.lagradost.cloudstream3.ui.search.SearchAdapter
|
||||||
import com.lagradost.cloudstream3.ui.search.SearchHelper
|
import com.lagradost.cloudstream3.ui.search.SearchHelper
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.getNameFull
|
import com.lagradost.cloudstream3.utils.AppUtils.getNameFull
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.html
|
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.isCastApiAvailable
|
import com.lagradost.cloudstream3.utils.AppUtils.isCastApiAvailable
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.loadCache
|
import com.lagradost.cloudstream3.utils.AppUtils.loadCache
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.openBrowser
|
import com.lagradost.cloudstream3.utils.AppUtils.openBrowser
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog
|
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialog
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialogInstant
|
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialogInstant
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showBottomDialogText
|
|
||||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog
|
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper
|
import com.lagradost.cloudstream3.utils.UIHelper
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute
|
import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute
|
||||||
|
@ -695,11 +692,9 @@ open class ResultFragmentPhone : FullScreenPlayer() {
|
||||||
setTextHtml(d.plotText)
|
setTextHtml(d.plotText)
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
isExpanded = !isExpanded
|
isExpanded = !isExpanded
|
||||||
filters = if (isExpanded) {
|
maxLines = if (isExpanded) {
|
||||||
arrayOf(InputFilter.LengthFilter(Integer.MAX_VALUE))
|
Integer.MAX_VALUE
|
||||||
} else {
|
} else 10
|
||||||
arrayOf(InputFilter.LengthFilter(1000))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import android.animation.Animator
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.InputFilter
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -843,11 +842,9 @@ class ResultFragmentTv : Fragment() {
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
if (context.isEmulatorSettings()) {
|
if (context.isEmulatorSettings()) {
|
||||||
isExpanded = !isExpanded
|
isExpanded = !isExpanded
|
||||||
filters = if (isExpanded) {
|
maxLines = if (isExpanded) {
|
||||||
arrayOf(InputFilter.LengthFilter(Integer.MAX_VALUE))
|
Integer.MAX_VALUE
|
||||||
} else {
|
} else 10
|
||||||
arrayOf(InputFilter.LengthFilter(1000))
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
view.context?.let { ctx ->
|
view.context?.let { ctx ->
|
||||||
val builder: AlertDialog.Builder =
|
val builder: AlertDialog.Builder =
|
||||||
|
|
|
@ -409,8 +409,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
|
android:maxLines="10"
|
||||||
android:foreground="@drawable/outline_drawable"
|
android:foreground="@drawable/outline_drawable"
|
||||||
android:maxLength="1000"
|
|
||||||
android:nextFocusUp="@id/result_back"
|
android:nextFocusUp="@id/result_back"
|
||||||
android:nextFocusDown="@id/result_bookmark_button"
|
android:nextFocusDown="@id/result_bookmark_button"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue