oday
01/16/2018, 9:29 AMSudhir Singh Khanger
01/16/2018, 11:30 AMint mBaseSystemUiVisibility = SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| SYSTEM_UI_FLAG_LAYOUT_STABLE;
rook
01/16/2018, 5:41 PMUserModel.Creator(
_, foo, bar, cat, moo, _ -> User(foo, bar, cat, moo)
)
works fine, but
UserModel.Creator(
_, foo, bar, cat, moo, _ -> {
Log.d("")
User(foo, bar, cat, moo)
}
)
doesn’t work.patrickdelconte
01/17/2018, 12:58 PModay
01/17/2018, 1:46 PMdiesieben07
01/17/2018, 2:15 PMkevinmost
01/17/2018, 5:27 PMClaudiuB
01/17/2018, 5:31 PMClaudiuB
01/17/2018, 7:06 PMx as? y != null
wck
01/18/2018, 10:12 PMjob.isCompleted
returns true after cancel()
siladu
01/20/2018, 2:07 PMfabricio
01/20/2018, 2:09 PMianbrandt
01/20/2018, 10:32 PMfun main(args: Array<String>) {
val ints = arrayOf(1, 2, 3)
// Type mismatch: inferred type is Array<Int> but IntArray was expected?
spreadTest(*ints)
}
fun spreadTest(vararg ints: Int) {
for (int in ints) {
println(int)
}
}
Moemen
01/21/2018, 1:49 PMmenegatti
01/23/2018, 1:00 PMAny
?dalexander
01/23/2018, 7:15 PMShawn
01/23/2018, 8:04 PMShawn
01/25/2018, 5:56 AMjstuyts-squins
01/25/2018, 12:32 PMArray((2018 - 1960 + 1), { i -> (i + 1960).toString() })
magicleon
01/25/2018, 6:40 PMQverkk
01/25/2018, 8:06 PMchb0kotlin
01/25/2018, 9:41 PMShawn
01/26/2018, 12:43 AModay
01/28/2018, 12:15 PModay
01/29/2018, 8:16 AMvicpinm
01/29/2018, 2:25 PMwineluis
01/29/2018, 9:09 PMbdawg.io
01/30/2018, 1:03 AMvalueOf
? Or will it only ever consider the name
property on the specified enum?Leeeloo Minai
01/30/2018, 8:25 PMtateisu
01/31/2018, 11:10 AM// I have to copy to local variable
fun menberFunction(){
var x = this.x
if( x == null ){
x = X()
this.x=x
}
codeUsingX(x)
// this.x may reset to null outside of this function.
}
// I want just using this.x
fun menberFunction(){
if( x == null ) x = X()
codeUsingX(x)
// this.x may reset to null outside of this function.
}
tateisu
01/31/2018, 11:10 AM// I have to copy to local variable
fun menberFunction(){
var x = this.x
if( x == null ){
x = X()
this.x=x
}
codeUsingX(x)
// this.x may reset to null outside of this function.
}
// I want just using this.x
fun menberFunction(){
if( x == null ) x = X()
codeUsingX(x)
// this.x may reset to null outside of this function.
}
Andreas Sinz
01/31/2018, 11:16 AMval x = this.x ?: X()
X
tateisu
01/31/2018, 11:17 AMthis.x=x
Andreas Sinz
01/31/2018, 11:18 AMtateisu
01/31/2018, 11:20 AMAndreas Sinz
01/31/2018, 11:22 AMnull
and afterwards use it like a non-nullable var?tateisu
01/31/2018, 11:26 AMAndreas Sinz
01/31/2018, 11:37 AMthis.x
isn't manipulated during the execution of the functionsthis.x
nullable?tateisu
01/31/2018, 11:38 AMAndreas Sinz
01/31/2018, 11:44 AMnull
and X()
tateisu
01/31/2018, 11:55 AMAndreas Sinz
01/31/2018, 1:40 PMtateisu
02/01/2018, 6:12 AMAndreas Sinz
02/01/2018, 7:51 AM