Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
62 views

Yet another SO question about ConstraintLayout and positioning. I have been having trouble with a particular layout, so I decided to go back to the basics and see what I'm not understanding. Copied ...
Dan Davis's user avatar
  • 603
2 votes
1 answer
68 views

Even though ConstraintLayout in Android is not new, I have only begun to convert my older layouts over as I find time or when creating new layouts, so my experience with them is limited. They don't ...
Dan Davis's user avatar
  • 603
2 votes
1 answer
66 views

I'm using a ConstraintLayout and 2 vertical Guidelines to simulate a grid-like area within my Android activity. These Guidelines represent 'columns' inside the ConstraintLayout. I've also put 3 ...
Mehrbod Kazemi's user avatar
0 votes
0 answers
16 views

I'm building a layout using CoordinatorLayout with AppBarLayout and CollapsingToolbarLayout in Android. My goal is: Collapse the Earth background image on scroll. Keep the user info layout (...
VishV's user avatar
  • 429
1 vote
1 answer
22 views

In my layout i display a stream widget (the WidgetFPV one) which contains a surface onto which a camera stream is projected via DJI'S MSDK5 sdk. I also have a card mapCard which hosts a MapBox map ...
Stelios Papamichail's user avatar
0 votes
0 answers
44 views

I'm maintaining legacy app which is still using XMLs and oldschool Views. I have androidx.constraintlayout.helper.widget.Flow component which has constraint_reference ids to other Views. Those other ...
Martin's user avatar
  • 2,984
0 votes
0 answers
22 views

I m building Android Application, so this is my Activity xml file: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:...
bircastri's user avatar
  • 2,177
0 votes
0 answers
16 views

I have a layout in which three checkboxes are all located at the same position. Only one of the checkboxes is enabled and visible at a time, depending on other parameters. I'm getting a "cb_xxx ...
Steve's user avatar
  • 1
0 votes
1 answer
71 views

I was following this document to find out how can use the decoupling api ConstraintLayout in Compose but unfortunately failed to build and run Here's the error I got I can't figure out why it's ...
Anas Ghareib's user avatar
0 votes
0 answers
48 views

I have an ImageView, and below it, there is a TextView. Both are inside a ConstraintLayout. The ImageView can display either a GIF or a normal image. The TextView appears fine when I use a normal ...
Taha Kirmani's user avatar
0 votes
1 answer
115 views

I'm trying to use a Flow widget to replace a vertical orientation LinearLayout that I was just using inside of my ConstraintLayout. It needs to satisfy all of the following: The "containing"...
Mikey A. Leonetti's user avatar
0 votes
1 answer
47 views

This question may look similar to the following question, but I need help solving my use case. It provides explanations for adding constraints inside the XML file. I'm trying to migrate from ...
Maxim Kirilov's user avatar
2 votes
1 answer
366 views

I'm trying to use constraint layouts to lay down my elements, but they do not truly respect the constraint I gave to them when the content of this elements is bigger than the space available. Is this ...
Jose Navío's user avatar
0 votes
1 answer
81 views

I'm facing some sort of trouble setting constraint on a view on runtime with a margin. These are the y and margin coordinate when the view is displayed to the user I set the margin like that : ...
Shindra's user avatar
  • 95
0 votes
1 answer
50 views

I have a very simple yet frustrating issue: I have two views inside a layout. The layout can be any layout but I have been trying to use a ConstraintLayout. I want these two views on opposite sides ...
Chocos's user avatar
  • 3
0 votes
2 answers
346 views

The width of the TextView below needs to match it's content width (in a ConstraintLayout), however when the content includes a long text, it currently extends horizontally beyond the width of the ...
GK100's user avatar
  • 3,684
1 vote
0 answers
30 views

Problem Here is my layout file: activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://...
Yatung Yü's user avatar
1 vote
0 answers
73 views

I've two fragments - IntroFragment DetailFragment Intro layout - <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&...
AndroidCoder's user avatar
  • 2,735
1 vote
0 answers
116 views

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 ...
Jaydeep Kasture's user avatar
0 votes
1 answer
60 views

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=&...
MXC's user avatar
  • 700
2 votes
1 answer
779 views

For example, I want the right side to align with the Image's start when the Text width is less than the screen's width, and the Text will wrap automatically when the Text's width exceeds the screen's ...
ggboundzhl's user avatar
1 vote
1 answer
73 views

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 ...
Andreas Andersson's user avatar
1 vote
0 answers
33 views

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 ...
Bugdr0id's user avatar
  • 3,083
0 votes
1 answer
57 views

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 ...
jetberrocal's user avatar
0 votes
2 answers
58 views

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, ...
Abdallah Mehiz's user avatar
0 votes
1 answer
51 views

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 ...
Mahmoud Manson's user avatar
0 votes
0 answers
38 views

how do I implement the below UI using constraint layout with xml in android studio?
Kossy's user avatar
  • 29
2 votes
2 answers
429 views

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 ...
Bincy Baby's user avatar
  • 4,783
1 vote
1 answer
152 views

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 ...
mKa's user avatar
  • 23
0 votes
0 answers
34 views

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 ...
Arya's user avatar
  • 1
0 votes
2 answers
42 views

This is my layout: <androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto&...
user1785730's user avatar
  • 3,839
0 votes
1 answer
40 views

This is my Activity layout: <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android....
user1785730's user avatar
  • 3,839
1 vote
1 answer
37 views

mock Trying to build something like this in a Constraint layout. Both textviews are side by side that are too long and should be ellipsized. Setting the layout_width to 0dp would stretch out the ...
hailoprime's user avatar
0 votes
1 answer
161 views

I have a task that I'm attempting to accomplish: to change constraints and update the layout programmatically when font scale configuration changes. Here I have the following code on a recyclerview ...
MajinKenn's user avatar
  • 109
0 votes
1 answer
41 views

I want to align the lower views to the left edge of the top view enter the image description here but they go away like this: enter image description here <?xml version="1.0" encoding=&...
Emran's user avatar
  • 11
0 votes
1 answer
38 views

In my code my app runs fine, but I am running into issues when I am using a different screen size. The buttons line up correctly but the images do not scale at all. This is my XML file <?xml ...
DCorn's user avatar
  • 82
0 votes
1 answer
97 views

I have two constraintlayouts nested in another constraintlayout. I've set a foreground image for the parent constraintlayout but the image overlaps on the other two layouts as you can see in the image ...
CharlyCM's user avatar
1 vote
1 answer
42 views

I have the following code snippet in xml. Its just showing 3 different views. But at runtime I want to change the alignment. However, the textviewShopNow should align at the parent End. But there ...
ant2009's user avatar
  • 22.7k
0 votes
1 answer
57 views

I'm using constraintlayout to design my activity: <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://...
vico's user avatar
  • 18.5k
1 vote
7 answers
333 views

When the coupon which is the small icon is gone, this part in the layout <androidx.appcompat.widget.AppCompatImageView android:id="@+id/imageViewCoupon" android:layout_width="...
ant2009's user avatar
  • 22.7k
1 vote
2 answers
156 views

I am using ConstraintLayout that contains child view. I want this child view centered but keeping aspect ratio. Layout (landscape) variant: <?xml version="1.0" encoding="utf-8"?&...
Jozo121's user avatar
  • 43
1 vote
0 answers
163 views

I have a ComposeView that is constrained to another View in an XML ConstraintLayout. The ComposeView houses a Column with VerticalScroll. Whenever you are scrolled to the bottom of the column and ...
avatar_aang's user avatar
1 vote
1 answer
44 views

I have the below UI which is fine till the Live image is visible Below is the XML layout <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/...
WISHY's user avatar
  • 12.1k
0 votes
1 answer
98 views

I wanted to display my super-tall image, so I tried to put it into ScrollView,and constraint it to the top of the screen so it would be possible to scroll through it. I imagined it would fill in the ...
Omega's user avatar
  • 1
0 votes
1 answer
46 views

So this is a bit difficult to describe please bear with me. I have a fragment with a ScrollView and a ConstraintLayout inside. The idea is that the fragment should be filled with a survey so there are ...
Laviniss's user avatar
0 votes
1 answer
52 views

I'm making a dynamic grid of colored TextViews as to make tiles, since it's dynamic, so I want the gridSize to be able to be changed while it's running, I need to do it programmatically. The problem ...
FishFeetSlapper's user avatar
0 votes
1 answer
76 views

I am trying to build a layout with constraint layout that has 2 views. In the portrait view, I want the veiws to be vertically stacked and in the landscape view I want the views to be next to each ...
Ravi's user avatar
  • 940
0 votes
1 answer
93 views

In an Android application, I have a layout containing a TextView at the top and two elements beneath it: an icon and another TextView. The second TextView displays a numerical value that undergoes a ...
AndroidCoder's user avatar
  • 2,735
1 vote
2 answers
82 views

I have two RecyclerViews view_a and view_b vertically on top of each other within a ConstraintLayout. Width: easy, match_parent. My problem is the height. The bottom view_b should wrap its content, ...
Thore's user avatar
  • 459
1 vote
0 answers
59 views

I'm sorry for the long title, but it's a little difficult to explain. I have a LazyColumn Composable into a FragmentContainerView. This container at the same time into a ConstraintLayout, sharing the ...
mcventur's user avatar

1
2 3 4 5
65