AppUtils

object AppUtils

Types

Link copied to clipboard
abstract class DiffAdapter<T>(val items: MutableList<T>, val comparison: (first: T, second: T) -> Boolean = { first, second -> first.hashCode() == second.hashCode() }) : RecyclerView.Adapter<RecyclerView.ViewHolder>

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun Context.createNotificationChannel(channelId: String, channelName: String, description: String)
Link copied to clipboard
fun Activity.downloadAllPluginsDialog(repositoryUrl: String, repositoryName: String)
Link copied to clipboard

Find the Watch Next program for given id. Returns the first instance available.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Context.getNameFull(name: String?, episode: Int?, season: Int?): String

| S1:E2 Hello World | Episode 2. Hello world | Hello World | Season 1 - Episode 2 | Episode 2

Link copied to clipboard
fun Context.getUri(data: Uri?): Uri?
Link copied to clipboard
fun getVideoContentUri(context: Context, videoFilePath: String): Uri?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun loadResult(url: String, apiName: String, startAction: Int = 0, startValue: Int = 0)
Link copied to clipboard
fun FragmentActivity.loadResult(url: String, apiName: String, startAction: Int = 0, startValue: Int = 0)
Link copied to clipboard
fun loadSearchResult(card: SearchResponse, startAction: Int = 0, startValue: Int? = null)
Link copied to clipboard
fun Activity?.loadSearchResult(card: SearchResponse, startAction: Int = 0, startValue: Int? = null)
Link copied to clipboard
fun Context.openBrowser(url: String, fallbackWebview: Boolean = false, fragment: Fragment? = null)

If fallbackWebview is true and a fragment is supplied then it will open a webview with the url if the browser fails.

Link copied to clipboard
fun openWebView(fragment: Fragment?, url: String)
Link copied to clipboard
fun BottomSheetDialog?.ownHide()
Link copied to clipboard
fun BottomSheetDialog?.ownShow()
Link copied to clipboard
inline fun <T> parseJson(value: String): T
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun AlertDialog.setDefaultFocus(buttonFocus: Int = DialogInterface.BUTTON_NEGATIVE)

Sets the focus to the negative button when in TV and Emulator layout.

Link copied to clipboard
fun RecyclerView.setMaxViewPoolSize(maxViewTypeId: Int, maxPoolSize: Int)
Link copied to clipboard
Link copied to clipboard

Any object as json string

Link copied to clipboard
inline fun <T> tryParseJson(value: String?): T?