Halil Ozercan
07/15/2020, 4:56 PMFudge
07/15/2020, 8:43 PMgravity
modifier only allows aligning horizontally, but not vertically (and also can only be called when a Column is in scope which is very odd, I mean what do you do when the column is way up the tree?)Ian Lake
07/15/2020, 10:27 PMMadhava
07/15/2020, 10:58 PMhenrikhorbovyi
07/16/2020, 12:40 AMdev14
?romainguy
07/16/2020, 12:42 AMSlackbot
07/16/2020, 1:50 AMDoris Liu
07/16/2020, 2:09 AMMadhava
07/16/2020, 5:18 AMJNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodV called with pending exception java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.lang.Object java.util.ArrayList.get(int) (ArrayList.java:437)
held mutexes= "mutator lock"(shared held)
I can share more detailed error logs if anyone wants.allan.conda
07/16/2020, 7:06 AMFudge
07/16/2020, 12:15 PMLazyColumnItems
? I have no problem placing one above it, e.g.
Column {
Text("top")
LazyColumnItems(items = listOf("1","2","3")) {
Text(it)
}
}
But if I try to place it below the bottom
text doesn't appear.
Column {
LazyColumnItems(items = listOf("1","2","3")) {
Text(it)
}
Text("bottom")
}
(In my case I also want to attach bottom
to the bottom of the column so I would add fillMaxHeight().wrapContentHeight(Alignment.Bottom)
as well)Fudge
07/16/2020, 1:35 PMTextField
unfocus? I can't draw focus away not by tapping outside, or by tapping the IME action on the keyboard, and I can't find a way to do it in code (something like a FocusNode I get from the TextField
that I can call unfocus()
on)
I've found some outdated discussion about it: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1584069025456900?thread_ts=1584053267.453300&cid=CJLTWPH7SCodeIdeal
07/16/2020, 3:45 PMchris
07/16/2020, 3:50 PMBox
but to not create a Circle
composable? I find myself wanting to break everything out into reusable components and rather than just creating the page I need, I end up building a whole infrastructure of components behind it.caelum19
07/16/2020, 9:59 PMDialog
seems good for this but it appears to have a rather small fixed size? Any pointers?Madhava
07/16/2020, 10:55 PMDoris Liu
07/17/2020, 2:07 AMMarcin Środa
07/17/2020, 7:48 AM<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="<http://schemas.android.com/apk/res/android>"
xmlns:app="<http://schemas.android.com/apk/res-auto>"
xmlns:tools="<http://schemas.android.com/tools>"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text goes here and it is reeeeeeeeeeeeeeeally long "
android:singleLine="true"
android:ellipsize="end"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toStartOf="@id/image"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/textView"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/avatars" />
</androidx.constraintlayout.widget.ConstraintLayout>
The idea is simple - don't let TextView to push ImageView out of screen.
I've set a ConstraintSet but cannot found an equivalent of constrainedWidth. Any ideas?Daniele Segato
07/17/2020, 11:02 AMDaniele Segato
07/17/2020, 11:14 AMDaniele Segato
07/17/2020, 11:14 AMgalex
07/17/2020, 2:03 PMByron Roberts
07/17/2020, 2:30 PMPlugin with id 'findbugs' not found
. I've tried removing them one by one but it eventually gets to Android plugins to which it claims to not be able to find. Just wondering if anyone ese has experienced this or if I might be missing something?galex
07/17/2020, 3:44 PMMarcin Środa
07/17/2020, 5:01 PMclass MessageViewModel : ViewModel() {
var state: MutableState<TextFieldValue> = state { TextFieldValue() }
}
Cause:
Functions which invoke @Composable functions must be marked with the @Composable annotationZach Klippenstein (he/him) [MOD]
07/17/2020, 5:01 PMgalex
07/18/2020, 4:06 AMgalex
07/18/2020, 6:43 AMinvoke()
on a reference of another Composable function, will that work someday?romainguy
07/18/2020, 7:01 AMCanvas.scale()
Yuriy Kulikov
07/18/2020, 1:44 PMYuriy Kulikov
07/18/2020, 1:44 PMJorge Castillo
07/18/2020, 1:49 PMYuriy Kulikov
07/18/2020, 1:52 PMJorge Castillo
07/18/2020, 2:12 PMYuriy Kulikov
07/18/2020, 2:26 PMJorge Castillo
07/18/2020, 4:04 PMYuriy Kulikov
07/18/2020, 4:07 PMmodifier = Modifier
.constrainAs(weekDaysText) {
top.linkTo(timeText.bottom)
start.linkTo(parent.start)
end.linkTo(switch.start)
bottom.linkTo(parent.bottom)
width = Dimension.fillToConstraints
}
constrainAs is available in ConstaintLayoutScope
Jorge Castillo
07/18/2020, 4:18 PM