miha-x64
12/07/2016, 8:44 AMIntRange
are optimized at compiler-level.
i in 0..N - 1
can be aslo written as i in 0 until N
, and someone said that this is also optimized (I have troubles in finding it in history).rudolf.hladik
12/07/2016, 8:59 AMmzgreen
12/07/2016, 8:59 AMrudolf.hladik
12/07/2016, 9:03 AMmzgreen
12/07/2016, 9:12 AMmzgreen
12/07/2016, 9:13 AMmzgreen
12/07/2016, 9:13 AMkirillrakhman
12/07/2016, 9:21 AMIntRange
. to be sure, you should check the built-in byte code viewer. in any case, if you use anko, there is an extension function List.forEachByIndex
that you can use to iterator over a list without creating garbagerattleshirt
12/07/2016, 9:38 AMrudolf.hladik
12/07/2016, 9:39 AMkupris
12/07/2016, 10:46 AMkirillrakhman
12/07/2016, 10:46 AMkupris
12/07/2016, 10:52 AMclass TwoColorsTextView : HtmlTextView{
private var separator: String = "jboiubombobumb"
private var test: Boolean = true
constructor(context: Context) : this(context, null)
constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0)
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {}
override fun setText(text: CharSequence?, type: BufferType?) {
try {
Log.d("test", test.toString())
Log.d("test", separator)
} catch (ex : IndexOutOfBoundsException){
super.setText(text, type)
}
}
}
kupris
12/07/2016, 10:53 AM<TwoColorsTextView
android:id="@+id/vBLCl"
style="@style/Missions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/holder.formula" />
kupris
12/07/2016, 10:53 AMkirillrakhman
12/07/2016, 10:54 AMkirillrakhman
12/07/2016, 10:54 AMkirillrakhman
12/07/2016, 10:54 AMkupris
12/07/2016, 10:56 AMkupris
12/07/2016, 10:59 AMkupris
12/07/2016, 11:00 AMkupris
12/07/2016, 11:01 AMkupris
12/07/2016, 11:15 AMkirillrakhman
12/07/2016, 11:24 AMkirillrakhman
12/07/2016, 11:24 AMfalse
) before its value is setkirillrakhman
12/07/2016, 11:25 AMnull
kupris
12/07/2016, 11:42 AMkirillrakhman
12/07/2016, 11:42 AMkirillrakhman
12/07/2016, 11:45 AMkirillrakhman
12/07/2016, 11:46 AM