rkeazor
06/08/2018, 11:15 AMAyden
06/08/2018, 4:08 PMAyden
06/08/2018, 5:06 PMyanek_
06/09/2018, 2:06 PMLukas Anda
06/10/2018, 7:08 AMgildor
06/10/2018, 12:28 PM./gradlew :app:dependencies
DanDPanda
06/10/2018, 3:37 PMval queue = Volley.newRequestQueue(this)
val url = "<https://api.fortnitetracker.com/v1/profile/${platformText}/${usernameText}>"
val stringRequest = StringRequest(Request.Method.GET, url,
Response.Listener<String> {
response -> println(response)
},
Response.ErrorListener {
println("Request didn't work")
})
queue.add(stringRequest)
kartikpatodi
06/10/2018, 8:47 PMandroid.support.constraint.ConstraintLayout
instead of androidx
equivalentnickk
06/11/2018, 10:10 AMPopupWindow
using anko
. However, my button handlers run as soon as the popup is presented, and the buttons do not respond to tapping. Any idea?
kotlin
private fun showAlert() {
// Get the Activity root view
val viewGroup = (findViewById<View>(android.R.id.content) as ViewGroup).getChildAt(0) as ViewGroup
val ui = AnkoContext.create(this)
val customView = with(ui) {
verticalLayout {
backgroundColor = Color.DKGRAY
padding = dip(10)
button("One") {
alert("Hi there") {
yesButton { }
}.show()
}
button("Two") {
longToast("Ooops")
}
}
}
val popup = PopupWindow(customView,
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT)
popup.showAtLocation(viewGroup, <http://Gravity.TOP|Gravity.TOP>, 0, 0)
}
ghedeon
06/11/2018, 3:53 PMhttps://i.imgur.com/Bdg931e.gif▾
Diefferson
06/11/2018, 8:38 PMwck
06/12/2018, 12:38 AMrkeazor
06/12/2018, 1:35 PMkenkyee
06/12/2018, 7:44 PMSlackbot
06/12/2018, 9:56 PMrattleshirt
06/13/2018, 12:29 PMKevin Janvier Chinabalire
06/13/2018, 9:20 PMfun bindview(pool:Any){
//want to convert
}
I have my class
class Users(var name, var id)
jw
06/13/2018, 9:33 PMLaci
06/14/2018, 6:03 AMFile '/Users/takacsl/Documents/MyApp/MyAndroid/Android/app' specified for property 'projectDir' is not a file.
kenkyee
06/14/2018, 4:20 PMfreddiewang
06/15/2018, 10:07 AMludwig
06/15/2018, 10:33 AModay
06/15/2018, 9:05 PMyaakov
06/15/2018, 10:24 PMedwardwongtl
06/16/2018, 4:41 PMjsonTodo
is the data you need to write, together with the id
, instead of removing it from the call site, what you should do it adding that to the function signature so that the function can receive both information you need.amanda.hinchman-dominguez
06/16/2018, 7:58 PMAyden
06/17/2018, 1:05 AMMainActivity.kt
fun retrieveApiData() {
val vibeApi: VibeApi
var vibeList = mutableListOf<Vibes>()
val retrofit: Retrofit = Retrofit.Builder()
.baseUrl(Constants.baseUrl)
.addConverterFactory(MoshiConverterFactory.create())
.build()
vibeApi = retrofit.create(VibeApi::class.java)
val call = vibeApi.getVibes()
// Object is not abstract and does not implement abstract member public abstract fun onResponse(call: Call<kotlin.collections.ArrayList<VibeList> /* = java.util.ArrayList<VibeList> */!>!, response: Response<kotlin.collections.ArrayList<VibeList> /* = java.util.ArrayList<VibeList> */!>!): Unit defined in retrofit2.Callback
call.enqueue(object: Callback<ArrayList<VibeList>> {
// Modifier 'override' is not applicable to 'local function'
override fun onResponse(call: Call<Vibes>?, response: Response<Vibes>?) {
var vibes = response?.body()
}
// Modifier 'override' is not applicable to 'local function'
override fun onFailure(call: Call<Vibes>?, t: Throwable?) {
Log.d("Vibe Adapter", "Failure")
}
})
}
DataClass
data class Vibes(@Json(name = "result") val vibeList: ArrayList<VibeList>)
data class VibeList(
@Json(name = "id") val id: Integer?,
@Json(name = "url") val url: String?,
@Json(name = "author") val author: String?)
freddiewang
06/18/2018, 8:57 AM@android.annotation.TargetApi(value = null)
in my project and it would cause build fail. does anyone know how to avoid it?kartikpatodi
06/18/2018, 11:00 PMandroidx.constraintlayout.widget.ConstraintLayout
and androidx.constraintlayout.ConstraintLayout
?arekolek
06/19/2018, 9:03 AM@VisibleForTesting
generate a warning in Kotlin for you?arekolek
06/19/2018, 9:03 AM@VisibleForTesting
generate a warning in Kotlin for you?gildor
06/19/2018, 9:08 AMarekolek
06/19/2018, 9:13 AMskennedy
06/19/2018, 4:55 PM@get:VisibileForTesting
?gildor
06/19/2018, 4:57 PM