3,243 questions
1
vote
1
answer
76
views
ConstraintLayout v 2.2.1 not filling screen
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 ...
2
votes
1
answer
73
views
ListView inside ConstraintLayout gets pushed offscreen by other elements positioned above it
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 ...
2
votes
1
answer
72
views
ConstraintLayout.Guidelines losing proportional percentage values at runtime
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 ...
0
votes
0
answers
22
views
How to collapse background image in CollapsingToolbarLayout and keep user info pinned and centered at top?
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 (...
0
votes
1
answer
27
views
Cannot dynamically adjust z-index of ConstraintLayout children when using a camera stream & map
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 ...
0
votes
1
answer
74
views
Why Android Studio is complaining about this
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 ...
0
votes
1
answer
151
views
How can I have a ConstraintLayout Flow widget wrap the "containing" views and the views also take up the remaining space?
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"...
0
votes
1
answer
57
views
How to add an ad view in ConstraintLayout at bottom and below other stuff programmatically?
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 ...
2
votes
1
answer
408
views
Compose ConstraintLayout does not respect constraints
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 ...
0
votes
1
answer
84
views
Constraint layout Y position not matching the margin value
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 :
...
0
votes
1
answer
53
views
Android: Two views on opposite side without overlap taking as little space as their content
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 ...
0
votes
2
answers
411
views
Android: How to set Max Width to match parent's width with layout_width="wrap_content"?
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 ...
1
vote
0
answers
31
views
Why the view go outside of screen by ConstrainLayout in the condition of RTL?
Problem
Here is my layout file:
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://...
1
vote
0
answers
81
views
Android - NavController - Reopening fragment is maintaining the Accessibility focus
I've two fragments -
IntroFragment
DetailFragment
Intro layout -
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&...
1
vote
0
answers
133
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 ...