This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 21 + 12 | |
| 3 - 97 | |
| 87 / 61 | |
| 1 * 2 | |
| 99 - 76 * 32 / 15 | |
| 76 * 55 | |
| 7 ^ 45 | |
| 8 * 14 /7 *5 | |
| 9 * 3 * 1 | |
| 4 * 2 - 12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val name = users?.listOfField(Bantuan::name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| open class Bantuan() { | |
| var id: Int? = null | |
| var name: String? = null | |
| var category: String? = null | |
| var info: String? = null | |
| var created: String? = null | |
| var updated: String? = null | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val name = users?.listOfField(User::nama) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline fun <reified T, Y> MutableList<T>.listOfField(property: KMutableProperty1<T, Y?>):MutableList<Y> { | |
| val yy = ArrayList<Y>() | |
| this.forEach { t: T -> | |
| yy.add(property.get(t) as Y) | |
| } | |
| return yy | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val users:MutableList<User> = mutableListOf(...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data class User(val id:Int?, val nama:String?, val alamat:String?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| infix fun View.onClick(function: () -> Unit) { | |
| this.setOnClickListener { function.invoke() } | |
| } | |
| object Terpaksa { | |
| private var context: Context? = null | |
| infix fun init(context: Context) { | |
| this.context = context | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kalauBatal diKlik { | |
| Terpaksa tanya Pertanyaan(denganJudul = "Batal?", | |
| isiPertanyaan = "Apakah anda ingin membatalkan Membatalkan?", | |
| kalauOke = {finish()}) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| recycler.loadData(ListJiwaContactorImpl::class.java, ListJiwaPresenter::class.java) |