Questions tagged [android-constraintlayout]
A new type of layout available in the Android Support repository built on top of a flexible constraint system, marking views positions relative to each other.
android-constraintlayout
3,260
questions
1
vote
0
answers
22
views
Ludo Game in Android Studio - Pawn Movement Issues on Different Devices
I am currently developing a Ludo game in Android Studio and have run into a significant issue regarding the movement of pawns across different devices.
Project Setup:
I have created a grid using ...
0
votes
1
answer
21
views
Cannot display an image in Constraint Layout
I have this xml but the image is only shown when I hard the width and height of the image. I am not sure why the constraints as I provided in the code are not working.
<merge
xmlns:android=&...
0
votes
1
answer
29
views
bias in jetpack compose ConstraintLayout
For example, I want the right side to align with Image's start when the Text width is less than screen's width, and the Text will wrap automatically when the Text's width is more than screen's width ,...
1
vote
1
answer
47
views
ConstraintLayout Custom view refusing to be used as a contraint
I've created some custom views based on ContraintLayout, which is basically a pairing of a textview and some other component.
EditTextCompat and SwitchCompat.
Both of them are basically created the ...
1
vote
0
answers
21
views
Android ConstraintLayout - adjust width of Childs
I need to have a composition which dynamically adjusts child view width depending on available space.
Rules:
Right and Left dividers always visible
Dividers size: min 6dp, max 16dp
Dividers can ...
0
votes
1
answer
34
views
How to limit ScrollView content inside CardView in ConstraintLayout on Kotlin. In Runtime the content show out of bounds
I am having trouble with the content of a ScrollView inside a CardView in ConstraintLayout. In the Design view it shows as I need it but on runtime the content of the ScrollView is shown covering the ...
0
votes
2
answers
31
views
Compose ConstraintLayout's pivots aren't working as intended?
I am trying to use Compose's ConstraintLayout composable to place a composable on 30% midway through the screen from the top.
I tried using the pivotY attribute in the constraint DSL to no avail, ...
0
votes
0
answers
22
views
Increasingly Large Spacing Between Rows in a RecyclerView in a ConstraintLayout
The spacing between rows in my RecyclerView becomes increasingly large. Setting layout_height to wrap_content didn't seem to fix this common spacing issue.
XML of recycler row:
<?xml version="...
0
votes
0
answers
18
views
Kotlin: How to access ConstraintLayout's layout_gravity attribute at runtime
I have the following resource (message_item.xml) which is a ConstraintLayout where I set the layout_gravity to "left"
<androidx.constraintlayout.widget.ConstraintLayout ...
android:id=...
0
votes
1
answer
35
views
Cardviews not scrollable inside scrollview
In the beginning, I searched for a solution to the problem extensively but couldn't resolve it, even after trying all the solutions and answers to similar questions here.
I have a scrollview which ...
0
votes
0
answers
28
views
How do I implement the UI as in the image below using constraint layout with XML in android studio?
how do I implement the below UI using constraint layout with xml in android studio?
0
votes
0
answers
11
views
A problem with the placement of an element in the constraint laoyut
I use a guide line to design the screens in the application, and for some reason when I try to place an image it doesn't place it well
The code I have a problem with
`<ImageView
android:id=&...
2
votes
2
answers
120
views
Convert XML Constraint Layout to Jetpack Compose - Chain Style, Bias
I am trying to create a specific layout with two views: a TextView and an ImageView. The TextView is dynamic, meaning the length of the text can vary. If the length of the text is less than the width ...
1
vote
1
answer
45
views
Constraint Layout items overlapping: Smart wrap text does not work when two opposing items intertwine
I want to make a list item which contains two texts , one anchored to the start of parent and one to the end of parent, I want the space to be dynamically handled each time and if too long it should ...
0
votes
0
answers
27
views
How do I bring the MedicineDetails card below nameRow (Box) using constraint layout?
This is how my preview looks without the MedicineDetails card
I want MedicineDetails card to be aligned below Add Medicine Box. I used constraint layout to do this.
But MedicineDetails card is coming ...