Questions tagged [layoutmargins]

28 questions
5
votes
5 answers

Add layoutMargins to one element in a UIStackView

I would like to create a vertical stackview with 3 elements in it. I want a bit more space only between the 2nd and the last element. So I thought about adding to the last element : mylastelement.layoutMargins = UIEdgeInsets(top:30,…
Jerem Lachkar
  • 1,008
  • 11
  • 24
2
votes
0 answers

Why CoordinatorLayout leaves a margin at the bottom?

When I use layout_height="wrap-content" in the CorrdinatorLayout, there is a margin at the bottom. Here's my code:
Jayesh Babu
  • 1,389
  • 2
  • 20
  • 34
2
votes
1 answer

How to set margin to main ConstraintView in android?

I want to set margin to my main layout with programmatically. I use layout params as following code. val parMain = mainLayout?.layoutParams as ConstraintLayout.LayoutParams But i have some error like android.view.ViewGroup$LayoutParams cannot be…
Murat Çakır
  • 150
  • 1
  • 14
1
vote
1 answer

How to set Page Layout margins in borb 2.1.16

How is the right way to set Page Layout margin now? In borb 2.1.15 works properly and in examples is some like this too: from borb.pdf import Document from borb.pdf import Page from borb.pdf import PageLayout from borb.pdf import…
iggh
  • 11
  • 2
1
vote
2 answers

ConstraintLayout - marginEnd has no effect

I'm trying to set the end margin attribute for a view as following:
Mickey Tin
  • 3,408
  • 10
  • 42
  • 71
1
vote
1 answer

Gone Margin constraints to multiple elements

I have a constraint layout with 3 buttons as shown below.
1
vote
1 answer

Change the margin of a constraint layout programmatically

I have created constraint layout which is use by many view but in a specific one, I need to modify the margin but I can't find the best way to do it. the code is: class BundleItemView @JvmOverloads constructor( context: Context, attrs:…
Seb
  • 2,929
  • 4
  • 30
  • 73
1
vote
1 answer

Android Constraint Layout margins change then revert back

After setting all four layout constraints, I attempt to set the margins. The margins morph to the desired UI (photo #2), but then immediately revert back to the original form (photo #1). This effectively nullifies the changes set to the margins.…
1
vote
0 answers

constraintlayout margin not getting applied

I have a margin applied to a constraintlayout in order for widgets to stop touching edges of the screen, like below
user158
  • 12,852
  • 7
  • 62
  • 94
1
vote
0 answers

Constraint margin not working properly on constraintlayout?

I am adding my views to constraint layout programmatically. The view has an image and title which should come at the bottom of the image with some margin. When I am applying margin to the textview, margin applies to image as well. Below is my code…
WISHY
  • 11,067
  • 25
  • 105
  • 197
1
vote
1 answer

Python Program to Read in a File of Text and then Write its Contents in Another File, with Margins of Different Sizes, Input By User

I am writing a new Python code and want to make it read in a file, then re-write the contents of the file to another one, but with added margins. The margins have to be input by the user and the text has to be left aligned. This is for a Python…
EAP
  • 31
  • 1
  • 8
0
votes
1 answer

MKMapView layoutMargins not updating

I am trying to move center of interests of a MKMapView() with layout margins. It works but only on init then I can change the value or do anything the map wont update the margins. The MapView : import SwiftUI import MapKit struct MapView:…
Jordan
  • 3,776
  • 3
  • 22
  • 28
0
votes
1 answer

How to reduce space between panels using plot margin to combine plots of different dimensions?

I want fig1 to span over three columns, and I have three versions of fig4 that need to be in row 2, in each column. set.seed(111) f1 <- data.frame(forest.type = rep(c("A","B","C","D"), times = 36 ), sp.type = rep(c("X","Y","Z"), times =…
RPlotter
  • 109
  • 1
  • 2
  • 11
0
votes
1 answer

Why are the margins of the root view and a subview with the same frame different?

I am simply trying to create a colored border along the margins of two subviews, one of which is defined in ViewController and the other in a UIView subclass. Both are subviews of the root view. I would like to make the blue border from the second…
ennell
  • 35
  • 1
  • 8
0
votes
0 answers

Aligning the button to the bottom of the screen while constraining it to the UI components above

I have a screen with two Edit texts and a button towards the bottom of the screen. Here is my xml:
1
2