Twidere-App-Android-Twitter.../twidere/src/main/kotlin/org/mariotaku/ktextension/ParcelableExtensions.kt

10 lines
255 B
Kotlin
Raw Normal View History

2016-07-02 05:54:53 +02:00
package org.mariotaku.ktextension
import android.os.Parcelable
2016-08-30 14:23:59 +02:00
fun <T> Array<Parcelable>.toTypedArray(creator: Parcelable.Creator<T>): Array<T> {
2016-07-02 05:54:53 +02:00
val result = creator.newArray(size)
System.arraycopy(this, 0, result, 0, size)
return result
}