Questions tagged [stackview]
214 questions
1
vote
0 answers
Kotlin Recyclerview Stack Layout Type showing wrong views
I am attempting to write a recyclerview which has some of the Viewholders inside it as stacked ontop of one another. The idea is that you can drag the topmost view above the stacked list and have drop it above where it becomes separate.
I managed…

Sjkato83
- 11
- 2
1
vote
1 answer
Vertical card stack view in SwiftUI
I want to make a card stack view vertically and it's overlapping with the associated card.
Like:
I tried with my example code but didn't work. Something missing out in the offset parameter. Please save my time.
Sample code:
// A card stack view…

Rahul Mayani
- 3,761
- 4
- 25
- 40
1
vote
1 answer
UILabel disappears in StackView when there is too much content
I have a UIStackView with three subviews in it: a title (UILabel), a body (UILabel), and a post image (UIImageView). This last image only gets added when the post has an imageURL (this is optional.)
Looking below, you can see that when I display the…

Kafka
- 117
- 8
1
vote
1 answer
Android: Add multiple views to ListView App Widget
I am trying to create a homescreen widget using the 3.1 SDK. I followed the StackWidget tutorial. and changed the StackView to ListView.
I want to add an image and text to each row in my list, and these are loaded at runtime.
I use this code in my…

Rohith Nandakumar
- 11,367
- 11
- 50
- 60
1
vote
1 answer
iOS14 - ViewHierarchy changes do prevent UIView extension to work
Using iOS14.0.1, Xcode12.0.1 and Swift5.3,
With iOS14, the following UIView-extension no longer works properly:
@discardableResult
func anchor(top: NSLayoutYAxisAnchor?, leading: NSLayoutXAxisAnchor?, bottom: NSLayoutYAxisAnchor?, trailing:…

iKK
- 6,394
- 10
- 58
- 131
1
vote
2 answers
constraint object by percentage in a stackview
I want to create a constraint that is 80 percent of the width of the uiview controller not a 100 percent which is what it is now. I tried using the var percent but its not working. The code should be centered on the y axis. So 10 percent on the left…
user7763839
1
vote
1 answer
Can I nest headers in a stackview using Clarity
In Clarity 2, we used the following code to generate a stack view with nested block headers.
Leases

Ruan Mendes
- 90,375
- 31
- 153
- 217
1
vote
3 answers
Is there a way to make a scrollview extend/shrink as needed in Swift?
I have a stackview (which the user can add/remove elements from) inside of a scrollview and I want the scrollview always adjust to have the same height as the stackview so that I don't have to add a bunch of unnecessary space if there's only a few…

dfisch
- 11
- 5
1
vote
0 answers
Populate TableViewCell's StackView with UIImages
My application downloads posts from my web-server. The posts might have one or more attachments (images).
My app has a TableView with cells.
Every cell has a StackView that should contain all the attachments, but I can't seem to get it…

Kárpáti András
- 1,221
- 1
- 16
- 35
1
vote
1 answer
Flutter: How to make the width of a Container equals to the width of the Stackview?
I have a Container wrapped inside the Stack. Since the Stack will have a variable width, I would like to set the Container width equals to the Stack width.
I tried the below code but it does not work.
Stack(
alignment: Alignment.center,
…

michealchow
- 136
- 4
- 14
1
vote
1 answer
Cannot change label position in stackview swift
I want to change X position of a label inside a stackview, there is a button inside the stackview as well. However, I am not able to change the label's position as once I set constraints for the label, errors jump out and want me to delete the…

yihan
- 29
- 1
- 4
1
vote
2 answers
Swift: Radio button into StackView are not displayed properly
I created a list of radio button in a stackView, but I do not understand why they are displayed wrong, they are not properly aligned
I want all my buttons to be correctly aligned on the left as I can solve this problem thank you!
Here is a part of…
user9914227
1
vote
1 answer
To create a chess board of same height and width in swift4
I am creating this chess game. for building this board i am taking 64 small views and have placed all of them in stack view. but every time i am find that views of one or two rows or columns have not same size as rest of the columns and rows (which…

Tapan Raut
- 73
- 7
1
vote
1 answer
Keyboard handling in iOS
I have an issue with my application. I am actually building a login page and I do not find how to handle the keyboard when a text field is active.
I have two text fields in a view. In my superView, I have 3 views. One on the bottom, another on the…

EdwinJr__
- 7
- 4
1
vote
2 answers
Swift stackview add subview in center
I use this code for view nib to stackview
for index in 0..<4 {
let view = CategoryClass.createMyClassView()
view.myLabel.text = "Hello World!"
self.stackView.addArrangedSubview(view)
}
And I get below image :
But I want to add subview…

salari mameri
- 228
- 5
- 13