hetang
08/26/2019, 5:22 AMAkbar
08/26/2019, 7:37 AMEfe
08/26/2019, 12:48 PMMarc Knaup
08/26/2019, 5:09 PMLiveData
as `Flow`:
@UseExperimental(ExperimentalCoroutinesApi::class)
fun <Value> LiveData<Value>.asFlow() = channelFlow<Value> {
val observer = Observer(this::offer)
observeForever(observer)
awaitClose { removeObserver(observer) }
}
Cody Engel
08/26/2019, 6:02 PMgenerateSqlDelightSchema
with version 1.1.4
?
It’s referenced in the readme but the task cannot be found, others have reported the issue without much traction so wondering if I’m missing something? https://github.com/square/sqldelight/issues/1400Ngenge Senior
08/26/2019, 8:05 PMKelvin Pere
08/27/2019, 1:56 PMadams2
08/27/2019, 3:39 PM@Nullable
on findViewById conflicting with T : View
(it's not T : View?
)Kulwinder Singh
08/28/2019, 11:34 AMConstraintLayout
-:
class CustomView(context: Context, attrs: AttributeSet) : ConstraintLayout(context, attrs) {
init {
var a: TypedArray? = null
......
val backgroundImage = a.getResourceId(R.styleable.CustomView_backgroundImage, -0)// image will be from assets
inflate(context, R.layout.custom_view, this)
if (backgroundImage != -0) Picasso.get().load(backgroundImage).into(img_background)
.....
}
}
with this code app compiles and on device it loads image. but problem is that it don't show image preview on android studio and android studio unable to render layout. any solution to this ?farzad
08/28/2019, 12:29 PMUserModel
. There exist cases in my code which I used copy
to clone the user model. My question is that is there a way to find all UserModel.copy calls?Icaro Temponi
08/28/2019, 7:54 PMigor.wojda
08/29/2019, 10:27 AMKotlin
+ Jacoco
? Can I use Jacoco
to get JUnit
test coverage of Kotlin code? Does some one uses is on day to day basics? How mature is it currently with Kotlin?escodro
08/30/2019, 1:03 AMorcchg
08/30/2019, 6:51 AMclass IconItemView : LinearLayout {
private var hideIcon: Boolean = true
constructor(context: Context): this(context, null)
constructor(context: Context, attributes: AttributeSet?): this(context, attributes, 0)
constructor(context: Context, attributes: AttributeSet?, defStyleAttr: Int): super(context, attributes, defStyleAttr) {
init(context, attributes, defStyleAttr)
}
private fun init(context: Context, attributes: AttributeSet?, defStyleAttr: Int) {
context.obtainStyledAttributes(attributes, R.styleable.IconItemView, defStyleAttr, R.style.IconItemView)
.apply {
hideIcon = getBoolean(R.styleable.IconItemView_icon_item_hide_icon, true)
recycle()
}
}
Property hideIcon is essentially final, since it's only assigned in constructor, though there are *init*ialization method inside. I dont want to pass the whole method body to one of constructors, but Kotlin neither allows to have that init() fuctions as a local function in ctor, nor to make hideIcon properly as val
Is there any way to make the property final?Laura de la rosa
08/30/2019, 3:16 PMhenrikhorbovyi
09/01/2019, 5:07 PMCoroutines Flow
with Room and I'm receiving the following error:henrikhorbovyi
09/01/2019, 5:09 PMtseisel
09/01/2019, 6:04 PMsrc/main/java
to src/main/kotlin
has any positive impact on build speed ?
I'd expect to avoid at least a java compiler pass.Ive Vasiljevic
09/01/2019, 7:48 PMlawlorslaw
09/02/2019, 3:16 AMEugen Martynov
09/02/2019, 5:52 AMheehawgr
09/02/2019, 8:58 AMIgor Maineti
09/02/2019, 4:48 PMbohsen
09/03/2019, 8:59 AMFlow
from a custom view or could this cause leaks?Damian J
09/03/2019, 3:59 PMtjohnn
09/03/2019, 4:53 PMDarrinps
09/03/2019, 5:13 PMRonak Android
09/04/2019, 9:40 AMrook
09/04/2019, 2:28 PMAkbar
09/04/2019, 2:48 PM