jw
12/18/2017, 8:00 PM$ gw tasks --all | grep UnitTestKotlin
220:compileDebugUnitTestKotlin - Compiles the debugUnitTest kotlin.
229:compileReleaseUnitTestKotlin - Compiles the releaseUnitTest kotlin.
katien
12/18/2017, 11:44 PMBaseFragment
should extend, and I'm not 100% sure this is a good idea to begin with. I end up duplicating that code across all fragments and sometimes will forget to write it, so I was thinking having it in one place might be nicekatien
12/19/2017, 12:16 AMkatien
12/19/2017, 6:41 AMabstract class BaseFragment : Fragment(), BaseView<BasePresenter<BaseFragment>> {
katien
12/19/2017, 6:41 AMThiago
12/19/2017, 3:55 PMjw
12/19/2017, 10:28 PMjw
12/19/2017, 10:40 PMThiago
12/20/2017, 9:53 AMmyanmarking
12/20/2017, 12:52 PMkatien
12/20/2017, 11:38 PMkatien
12/20/2017, 11:47 PMinterface BasePresenter<T> {
var view: T?
fun attachView(view: T) { this.view = view}
fun detachView() { this.view = null}
}
katien
12/21/2017, 12:36 AM{
"errors": {
"first_name": [
"first name is required"
],
"last_name": [
"last name is required"
],
"image": [
"Invalid image format"
]
},
"message": "Invalid profile data",
"status": 400
}
I parse my json into this response model:
data class ErrorResponse (
var errors: Map<String, List<String>> = emptyMap(),
var status: Int = 0) {
operator fun get(k: String): List<String>? = errors[k]
}
artfuldev
12/23/2017, 11:02 AMjw
12/23/2017, 7:50 PMadam-mcneilly
12/25/2017, 12:12 AMonCreate()
.
Now I want to expand this same dialog fragment to be used for adding or editing a transaction. In my head I see two options: a separate new instance method that takes in the transaction to be edited and I use some flag to determine the state of the dialog.
Is there some way to use sealed classes for this, though? I could have like sealed class TransactionState
with a class for add and edit, but it doesn't look like sealed classes can be parcelable, so idk if what I'm asking is feasible but would love for someone to put my mind at rest about it.kevin.cianfarini
12/25/2017, 12:24 AMCollapsingToolbarLayout
docs and stackoverflow. Can anyone point me in the right direction?Iain
12/26/2017, 5:41 PMclass GetCoordinatesApiManager: Callback<LocationResult> {
var completionHandler: (flag:Boolean) -> Unit = {}
fun getCoordinates(userIds: ArrayList<Int>, handler: (flag: Boolean) -> Unit) {
completionHandler = handler
ApiClient.apiInterface.getCoordinates(userIds, UserState.bearerToken!!).enqueue(this)
}
Android Studio complains that this
in enqueue(this)
is Type Mismatch Required: Callback <LocationResult!>! Found: GetCoordinatesApiManager
menegatti
12/27/2017, 10:04 AMbubble
you should it use that instead of advancing the iterator againmenegatti
12/27/2017, 10:30 AMmenegatti
12/27/2017, 10:43 AMbesnik
12/27/2017, 2:54 PMnredondo26
12/27/2017, 8:24 PMrkeazor
12/27/2017, 9:29 PMnoahdurell
12/28/2017, 3:05 AMsourabhv
12/28/2017, 12:58 PMType mismatch. Required: VH? Found PaginatedRecyclerViewAdapter<VH, T>.BaseViewHolder?
david.bilik
12/28/2017, 3:49 PMredrield
12/30/2017, 7:40 AMbradfordholcombe
01/01/2018, 10:14 PMbradfordholcombe
01/02/2018, 12:34 AM