Questions tagged [constraintlayout-barrier]
13 questions
8
votes
1 answer
ConstraintLayout Barrier not working properly when parent dimensions are set to wrap_content
Here's a reproduction of my issue:

Ernest Zamelczyk
- 2,562
- 2
- 18
- 32
4
votes
3 answers
Constraint layout barrier not working as expected
I have 2 views and I need a barrier below but the barrier does not work as expected.
Here is my layout.

Ankit Verma
- 496
- 5
- 21
4
votes
1 answer
ConstraintLayout - Connecting widget to barrier problem
I'm having a strange problem:
layout.xml

l000000l
- 330
- 1
- 3
- 14
2
votes
2 answers
How to constraint views/widgets to barriers using AS 3.6.3
I only started studying android development recently. Right now, I'm focusing on ConstraintLayout.
I've been using this codelab to learn.
https://codelabs.developers.google.com/codelabs/constraint-layout/index.html?index=..%2F..%2Findex#10
I'm…

Draugen
- 21
- 3
2
votes
2 answers
Chain two barriers in ConstraintLayout
I'm going to achieve this goal using ConstraintLayout:
The length of each TextView is not fixed and may change and the TextViews should be in the middle of their columns. I guessed that barriers and guidelines could help me if I chain barrier_left…

Alireza Noorali
- 3,129
- 2
- 33
- 80
1
vote
1 answer
What am I doing wrong: Constraintlayout inside ScrollView in Android Studio not scrolling to the end
I am not sure what I am doing wrong. I have read most of the samples I could find on YouTube and other places and tried the solutions they gave, but have not been able to resolve my issue.
The issue is that I am using ConstraintLayout inside…

Gab
- 11
- 2
1
vote
2 answers
ConstraintLayout barrier doesn't work correct for all view holders of RecylcerView
I have three TextViews (Rating, VotesRating and Votes) in one line but only one of them can be visible at the same time. That's why I added a Barrier with ids of those TextViews movie_rating,movie_votes,movie_rating_votes. And then I use that…

user924
- 8,146
- 7
- 57
- 139
1
vote
1 answer
Can't constrain an element to a barrier
I'm having an issue where I'm trying to constrain a button to a vertical barrier. When I drag the button's side that I want to constrain to the barrier, it doesn't seem to recognise the barrier. It doesn't snap onto it or apply any constraint after…

MrLem
- 19
- 4
0
votes
1 answer
Android ConstraintLayout constraint barrier to parent
I want a simple thing in my layout - align an image and text horizontally and then align that group to parent top. If the text is long and gets higher than the image, then it touches the parent top, otherwise the image will touch parent top.
How…

frangulyan
- 3,580
- 4
- 36
- 64
0
votes
1 answer
Balancing horizontally 2 TextViews and an ImageView between them according to text length
If Text1 is longer, than it should push everything to the right
If Text2 is longer, than it should push everything to the left
Otherwise, the arrow should be centered according to parent view
If any TextView exceeds, thus the whole view exceeds…

Ron D.
- 3,774
- 6
- 31
- 39
0
votes
1 answer
Bug: Barrier connected with "percent height" in ConstraintLayout is inside a ScrollView
I have a ScrollView which has a ConstraintLayout.
Inside the ConstraintLayout I want to position a View to the bottom of a Barrier.
The Barrier itself has constraints: a Guideline(it can be also a view with height half of parent) which is half of…

Ultimo_m
- 4,724
- 4
- 38
- 60
0
votes
1 answer
Guideline does not shift based on change in Views dimensions inside barrier in ConstraintLayout
I have my root layout as ConstraintLayout in my activity. I have added one Guideline which is Percentage based and it is about 35 % from top. The Guideline divides the Layout in 2 section (35% top & 65% bottom). In top 25% section I have 2…

Satyam Gondhale
- 1,415
- 1
- 16
- 43
0
votes
1 answer
ConstraintLayout Barrier not respecting Group
I have a Barrier which references three views. These three views are beneath one another, like this:
---- View A
---- View B
---- Group
--------- Barrier
---- View D
View D has a constraint to the Barrier and View B and the Group at any time…

Subby
- 5,370
- 15
- 70
- 125