gabrielfv
07/03/2018, 7:50 PMtypealias SourceOrFactory<T> = List<T> | DataSource.Factory<T>
Nikky
07/05/2018, 1:51 AM=
super thin in in the screenshot or are those -
?
and i am not sure if its a proper replacement but there is StringBuffer too
and StringBuilder should still exist.. maybe your gradle setup is incorrect or just broken during switch to 1.2eliasaj
07/05/2018, 12:41 PMIvan
07/07/2018, 10:39 PMunnsse
07/09/2018, 2:19 AMbenleggiero
07/09/2018, 3:20 AMclass Foo {
companion object
}
typealias Bar = Foo
fun Foo.Companion.hoge() = "hoge" // Okay
fun Bar.Companion.qux() = "qux" // ERROR: Unresolved reference: Companion
forcelain
07/09/2018, 6:08 PMmylist + newElement
make a new list?HaSH
07/10/2018, 6:41 PMHaSH
07/10/2018, 6:43 PMvvl
07/10/2018, 7:38 PMdata class Test(val test1: Int, val test2: Int, private val test3: Int = test2 * test1)
edwardwongtl
07/11/2018, 7:39 AMmap[key]?.let { f(it) } ?: init
Rak
07/11/2018, 10:06 AMNikolai
07/14/2018, 4:40 AModay
07/17/2018, 7:53 AMfromPriceValueET.typeface = Typeface.createFromAsset(
assets, "fonts/Sofia Pro Bold.otf"
)
toPriceValueET.typeface = Typeface.createFromAsset(
assets, "fonts/Sofia Pro Bold.otf"
)
budgetCurrencyTV.typeface = Typeface.createFromAsset(
assets, "fonts/Sofia Pro Bold.otf"
)
Aregev2
07/17/2018, 12:34 PMbruno.aybar
07/17/2018, 2:41 PMSudhir Singh Khanger
07/18/2018, 2:31 AMfun diskIO(): Executor = diskIO
fun diskIO(): Executor {
return diskIO
}
Are these two syntax doing the same thing?ahegazy
07/18/2018, 12:32 PMAndreas Sinz
07/18/2018, 2:06 PMObservable
Aregev2
07/18/2018, 8:10 PMAregev2
07/18/2018, 8:16 PMSudhir Singh Khanger
07/19/2018, 3:12 AMIf the constructor has annotations or visibility modifiers, the constructor keyword is requiredI don't see it being followed in the Google sample.
@Singleton
open class AppExecutors(
private val diskIO: Executor,
private val networkIO: Executor,
private val mainThread: Executor
) {
What is going on here?
https://github.com/googlesamples/android-architecture-components/blob/master/GithubBrowserSample/app/src/main/java/com/android/example/github/AppExecutors.kt#L35
https://kotlinlang.org/docs/reference/classes.htmlSudhir Singh Khanger
07/19/2018, 3:27 AMIf the class has a primary constructor, each secondary constructor needs to delegate to the primary constructor, either directly or indirectly through another secondary constructor(s). Delegation to another constructor of the same class is done using the this keyword:
class Person(val name: String) {
constructor(name: String, parent: Person) : this(name) {
parent.children.add(this)
}
}
Are there any examples of direct and indirect delegation here? What is parent.children.add(this)
?Jogendra Shekhawat
07/19/2018, 12:52 PMBenjamin Drucker
07/19/2018, 11:51 PMTom Adam
07/20/2018, 7:51 AMdiesieben07
07/20/2018, 1:24 PMval instance by lazy { SomeClass() }
Michel
07/20/2018, 1:27 PMkango_v
07/20/2018, 1:30 PMclass Test (
val id: UUID
) {
private constructor(builder: Builder) : this(builder.id)
companion object {
inline fun build(id: UUID, block: Builder.() -> Unit) = Builder(id). apply(block).build()
}
class Builder(
val id: UUID) {
var text: String? = null
fun build() = Test(this)
}
}
but, at apply
, i'm getting Unresolved reference: apply
. I am using the Eclipse Kotlin plugin. I know, I should be using IDEA....... one step at a time. 🙂oday
07/21/2018, 6:29 PModay
07/21/2018, 6:29 PMShawn
07/21/2018, 6:30 PMkarelpeeters
07/21/2018, 6:30 PModay
07/21/2018, 6:31 PMursus
07/22/2018, 3:26 PModay
07/23/2018, 8:49 AMursus
07/23/2018, 2:25 PM