Skip to content

death14stroke/kotlin-eezetensions

Repository files navigation

kotlin-eezetensions

Extension functions which I found can be useful and save time and code Download

Use

Add to your build.gradle (Module) file in dependencies: version

implementation 'com.andruid.magic:eezetensions:1.0.3'

Global

  • buildTetherSettingsIntent(): Intent

android.content.Context

  • color(@ColorRes color: Int): Int
  • drawable(@DrawableRes res: Int): Drawable?
  • startFgOrBgService(intent: Intent)
  • hasInternet(): Boolean (requires Manifest.permission.ACCESS_NETWORK_STATE)
  • getPackageVersion(): String?
  • toast(msg: String, duration: Int = Toast.LENGTH_SHORT, fromBg: Boolean = false)
  • toast(@StringRes msgRes: Int, duration: Int = Toast.LENGTH_SHORT, fromBg: Boolean = false)
  • getUserDeviceName(): String
  • buildSettingsIntent(): Intent
  • getApplicationName(): String
  • isMobileDataEnabled(): Boolean

androidx.fragment.app.Fragment

  • color(@ColorRes color: Int): Int
  • drawable(@DrawableRes res: Int): Drawable?
  • startFgOrBgService(intent: Intent)
  • hasInternet(): Boolean (requires Manifest.permission.ACCESS_NETWORK_STATE)
  • toast(msg: String, duration: Int = Toast.LENGTH_SHORT, fromBg: Boolean = false)
  • toast(@StringRes msgRes: Int, duration: Int = Toast.LENGTH_SHORT, fromBg: Boolean = false)

android.location.Location

  • getMapsUrl(): String

android.view.View

  • hide()
  • show()

About

Extension functions which I found can be useful and save time and code

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages