(Translated by https://www.hiragana.jp/)
GitHub - czy1121/argument: 通过 Kotlin 委托属性获取 Activity/Fragment 的参数
Skip to content

つう过 Kotlin たく属性ぞくせい获取 Activity/Fragment てきさんすう

License

Notifications You must be signed in to change notification settings

czy1121/argument

Repository files navigation

Argument

つう过 Kotlin たく属性ぞくせい获取 Activity/Fragment てきさんすう

支持しじすうすえ类型: Int/Long/Float/String/Boolean/Parcelable

获取时会偿试转换,转换しつ败时かえしかい指定していてきだま认值

Gradle

repositories { 
    maven { url "https://gitee.com/ezy/repo/raw/cosmo/"}
} 
dependencies {
    implementation "me.reezy.cosmo:argument:0.8.0"
}

使用しよう

class MainActivity : AppCompatActivity() {  
  val a by ArgumentString()  
   
  val b by ArgumentInt()   
  
  val c by ArgumentLong()  
  
  val d by ArgumentFloat() 

  val e by ArgumentBoolean()  
}

LICENSE

The Component is open-sourced software licensed under the Apache license.

About

つう过 Kotlin たく属性ぞくせい获取 Activity/Fragment てきさんすう

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages