mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
added tests for layout
This commit is contained in:
parent
273a947f8e
commit
04f52f4a6d
6 changed files with 107 additions and 8 deletions
|
@ -97,6 +97,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.loadRepository
|
|||
import com.lagradost.cloudstream3.utils.AppUtils.loadResult
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.loadSearchResult
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.setDefaultFocus
|
||||
import com.lagradost.cloudstream3.utils.BackupUtils.backup
|
||||
import com.lagradost.cloudstream3.utils.BackupUtils.setUpBackup
|
||||
import com.lagradost.cloudstream3.utils.Coroutines.ioSafe
|
||||
import com.lagradost.cloudstream3.utils.Coroutines.main
|
||||
|
@ -753,13 +754,25 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
|||
if (isCastApiAvailable()) {
|
||||
mSessionManager = CastContext.getSharedInstance(this).sessionManager
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
logError(e)
|
||||
} catch (t: Throwable) {
|
||||
logError(t)
|
||||
}
|
||||
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
||||
updateTv()
|
||||
|
||||
// backup when we update the app, I don't trust myself to not boot lock users, might want to make this a setting?
|
||||
try {
|
||||
val appVer = BuildConfig.VERSION_NAME
|
||||
val lastAppAutoBackup = getKey<String>("VERSION_NAME") ?: 0
|
||||
if (appVer != lastAppAutoBackup) {
|
||||
setKey("VERSION_NAME", BuildConfig.VERSION_NAME)
|
||||
backup()
|
||||
}
|
||||
} catch (t : Throwable) {
|
||||
logError(t)
|
||||
}
|
||||
|
||||
// just in case, MAIN SHOULD *NEVER* BOOT LOOP CRASH
|
||||
binding = try {
|
||||
if (isTvSettings()) {
|
||||
|
|
|
@ -87,7 +87,7 @@ class HomeChildItemAdapter(
|
|||
else -> null
|
||||
}
|
||||
|
||||
(itemView.image_holder ?: itemView.background_card)?.apply {
|
||||
(itemView.background_card)?.apply {
|
||||
val min = 114.toPx
|
||||
val max = 180.toPx
|
||||
|
||||
|
|
|
@ -32,15 +32,28 @@ import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showOptionSelectSt
|
|||
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbar
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.fixPaddingStatusbarView
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.setImage
|
||||
import kotlinx.android.synthetic.main.activity_main.view.*
|
||||
import kotlinx.android.synthetic.main.fragment_home_head.view.*
|
||||
import kotlinx.android.synthetic.main.activity_main.view.nav_rail_view
|
||||
import kotlinx.android.synthetic.main.fragment_home_head.view.home_bookmark_parent_item_title
|
||||
import kotlinx.android.synthetic.main.fragment_home_head.view.home_bookmarked_child_recyclerview
|
||||
import kotlinx.android.synthetic.main.fragment_home_head.view.home_preview_bookmark
|
||||
import kotlinx.android.synthetic.main.fragment_home_head.view.home_preview_image
|
||||
import kotlinx.android.synthetic.main.fragment_home_head.view.home_preview_info
|
||||
import kotlinx.android.synthetic.main.fragment_home_head.view.home_preview_play
|
||||
import kotlinx.android.synthetic.main.fragment_home_head.view.home_search
|
||||
import kotlinx.android.synthetic.main.fragment_home_head.view.home_watch_parent_item_title
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.*
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_bookmarked_holder
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_none_padding
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_plan_to_watch_btt
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_change_api
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_change_api2
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_description
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_hidden_next_focus
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_hidden_prev_focus
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_info_btt
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_play_btt
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_tags
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_text
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_preview_viewpager
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_type_completed_btt
|
||||
import kotlinx.android.synthetic.main.fragment_home_head_tv.view.home_type_dropped_btt
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/background_card"
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
|
@ -16,13 +16,22 @@
|
|||
app:cardCornerRadius="@dimen/rounded_image_radius"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/title_shadow"
|
||||
android:visibility="gone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
tools:ignore="ContentDescription" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/image_holder"
|
||||
android:id="@+id/background_card"
|
||||
android:layout_width="114dp"
|
||||
android:layout_height="180dp"
|
||||
android:elevation="10dp"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue