Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
tailrec fun Context.getActivity(): Activity?

Use to get Activity from Context.

Link copied to clipboard
inline fun <T : Any> getKey(path: String): T?
inline fun <T : Any> getKey(path: String, defVal: T?): T?
inline fun <T : Any> getKey(folder: String, path: String): T?
inline fun <T : Any> getKey(folder: String, path: String, defVal: T?): T?
Link copied to clipboard
fun <T : Any> getKeyClass(path: String, valueType: Class<T>): T?
Link copied to clipboard
fun getKeys(folder: String): List<String>?
Link copied to clipboard
fun openBrowser(url: String, activity: FragmentActivity?)

Will fall back to WebView if in TV or emulator layout.

fun 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 removeKey(path: String)
fun removeKey(folder: String, path: String)
Link copied to clipboard
fun removeKeys(folder: String): Int?
Link copied to clipboard
fun <T> setKey(path: String, value: T)
fun <T> setKey(folder: String, path: String, value: T)
Link copied to clipboard
fun <T : Any> setKeyClass(path: String, value: T)