Questions tagged [layout]

The layout tag is for questions about the placement, alignment and justification of objects with respect to a containing element. For questions pertaining to CSS, use the 'css' tag instead.

In computing, layout is the process of calculating the position of objects in space subject to various constraints. This functionality can be part of an application or packaged as a reusable component or library.

Android Development Examples:

HTML Examples:

26721 questions
7
votes
3 answers

Android Studio 3.4.1 constraintlayout editor preview not working AGAIN

I believe I have had similar issues in the past ever since v3.x and they keep coming. I don't know how many hours I have to spend on trying to use the layout editor and they just can't get it right. Anyway, here is the xml code:
breakline
  • 5,776
  • 8
  • 45
  • 84
7
votes
2 answers

Fast Interactive force-directed graph layout engine

I need a framework/library which will enable me to develop a realtime interactive graph simulation. The user must be able to dynamically add nodes and edges. I have found Prefuse and its force directed layout and I really like it. But it is not…
l245c4l
  • 4,135
  • 9
  • 35
  • 40
7
votes
1 answer

ListView's first entry always incorrect for RTL

For some reason, the first entry in my ListView is always flipped the wrong way around when I use RTL. For example: Additional information: The ListView is in a DialogFragment. I HAVE updated my manifest to support RTL (the rest of the app works…
Zee
  • 1,592
  • 12
  • 26
7
votes
2 answers

How to use own view in layout?

I created a class like this public final class MyView extends View { public MyView(Context context, AttributeSet attrs) { super(context, attrs); [...] } [...] } and then I want to use it within my layout.xml
hitzi
  • 852
  • 2
  • 10
  • 23
7
votes
3 answers

How to implement Vertical dotted line below image in Android?

How can I achieve this kind of layout without using any library?? I tried something like this but was unable to get the exact layout my_layout.xml
7
votes
1 answer

Scrollable content inside WPF Viewbox with "UniformToFill"

How could I make the content which is put inside WPF Viewbox with Stretch="UniformToFill" be scrollable? For example:
rem
  • 16,745
  • 37
  • 112
  • 180
7
votes
10 answers

What is the difference between linear and relative layout?

What is the difference between linear and relative layout?
user601367
  • 2,308
  • 12
  • 34
  • 44
7
votes
3 answers

Cordova iPhone X safe area after layout/orientation changes.

I'm using the CSS variable safe-area-inset-top in my Cordova app to handle iPhone X safe area: body { padding-top: env(safe-area-inset-top); } Works as expected when the app boots up. However, when I enter and exit a full screen (forced landscape)…
ndmweb
  • 3,370
  • 6
  • 33
  • 37
7
votes
5 answers

Android portrait and landscape layouts

I have the following layout: I need the following layout in portrait mode: But instead of that I obtain the following one that I don't know how to modify it: How can I do that?
Lechucico
  • 1,914
  • 7
  • 27
  • 60
7
votes
0 answers

React Native fix for iOS zoom mode

Is there a way to disable layout scaling when the user enables zoom mode on iOS? Something like allowFontScaling={false} for dynamic font scaling, or anything similar? When the user enables that mode, the whole layout is messed up and zoomed in, for…
cinemanja
  • 481
  • 6
  • 19
7
votes
3 answers

position: relative causes anchors to be unclickable

I was fiddling around with a web site I am developing, attempting to fix some odd IE7 bugs, since this is an internal project and IE7 is the standard browser. I ended up adding "position: relative" to correct a couple IE-specific layout problems,…
WorkerThread
  • 2,195
  • 2
  • 19
  • 23
7
votes
2 answers

Replacement for `AbsoluteLayout` from Vaadin 8 Framework in Vaadin 10 Flow?

The AbsoluteLayout in Vaadin 8 (Framework) enables pixel-position-oriented placement of widgets within a layout. While not my first layout of choice, the AbsoluteLayout is suited to porting code from other UI-building platforms that use…
Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
7
votes
3 answers

Android background string resource

I am working on a layout XML file, and I want to set a background color for a LinearLayout. This bit, which I am now using, works perfectly: android:background="#1a64b7" However, I would much prefer to break that out. In my strings.xml file I have…
Nick
  • 6,900
  • 5
  • 45
  • 66
7
votes
3 answers

How can you measure the space that a text will take in Javascript?

In Javascript, I have a certain string, and I would like to somehow measure how much space (in pixels) it will take within a certain element. Basically what I have is an element that will float above everything else (like a tooltip), and I need to…
Daniel Magliola
  • 30,898
  • 61
  • 164
  • 243
7
votes
7 answers

EditText height changes according to the text size

If I change the textsize in editext, the height of edittext changes accordingly. I want the size of edittext to be same and I want a smaller sized hint or text to be in it. What should I do? Following is the code and I am also posting the…
Kylo Ren
  • 486
  • 6
  • 24
1 2 3
99
100