Questions tagged [view-hierarchy]

A view hierarchy defines the relationships of the views to one another.

A view hierarchy defines the relationships of the views to one another.

50 questions
42
votes
0 answers

Traversing the View Hierarchy on an iPhone or iPad

Here is a helpful routine you can use in an iOS app to traverse the view hierarchy when you want to know what's being created and where it's going. This routine dumps the view hierarchy to NSLog() starting at the view passed in. Subviews show their…
Sophtware
  • 1,718
  • 1
  • 20
  • 34
41
votes
5 answers

ConstraintLayout views in top left corner

Every time I create views like Button and TextView in ConstraintLayout, they all get stuck at the top corner instead of where I placed them. I tried to create new activities and change the emulator, but the result is still the same. This is a…
24
votes
0 answers

SwiftUI UITableView was told to layout its visible cells and other contents without in view hierarchy

I have a list in a view (lets call it view A) where I push a view B via NavigationLink from view A and manipulate the CurrentSubjectValue to the initial view A. The moment the data is added and the didChangd.send(value) is dispatched to view A I get…
Arash
  • 1,007
  • 1
  • 9
  • 18
12
votes
5 answers

First view above / overlapping second in LinearLayout

Is it possible to show the first view in a LinearLayout overlapping the second? I would like to layout my views like so:
RileyE
  • 10,308
  • 12
  • 60
  • 103
7
votes
0 answers

Child view controller should have parent view controller but actual parent is (UIViewControllerHierarchyInconsistency)

I have an app which has UITabbarController as the initial window(after logging-in i set it as rootViewController) This tabbarController has 4 different tabs in it which are all UIViewControllers embedded in a UINavigationController. In my…
6
votes
4 answers

Why does minHeight attribute not work in WebView Android?

This question has already been asked here, but it has no solution. I have a WebView. I want to set minimum height to the WebView using minHeight attribute, but it doesn't work. The same attribute works for Button.
thedarkpassenger
  • 6,049
  • 2
  • 32
  • 52
6
votes
1 answer

Error grabbing View Hierarchy, XCode 8.2.1: "No plist data for fetching view hierarchy"

While trying to debug my view hierarchy, I get the following error: Error: Unable to capture view hierarchy. Details: No plist data for fetching view hierarchy: error evaluating expression “(id)[(Class)objc_getClass("DBGViewDebuggerSupport_iOS")…
Vaiden
  • 14,116
  • 6
  • 55
  • 86
6
votes
1 answer

android get view hierarchy for all windows in activity

I am making SKD for Automation. So my needs are slightly different that normal app development. Requirement: Get ViewHierarchy of current activity. Problem: I get it correct when Spinner is not open. I do not get the details of spinner when its…
TorukMakto
  • 1,936
  • 2
  • 21
  • 37
4
votes
2 answers

View is in the last position of parent, but still being blocked

What I want to do In a BottomSheetDialogFragment, I want to inflate a view that always stick at the bottom of the screen, no matter what state (collapsed / expanded) the BottomSheetBehavior is in. What I have done In a subclass of…
3
votes
1 answer

viewWillAppear not called apparently due to my view hierarchy

This appears to be a well documented problem, yet the solutions online have not worked. Here's just a sample list of posts that failed to provide me with a working answer: ViewWillAppear not executing code viewWillAppear not getting…
3
votes
0 answers

FrameLayout not respecting draw order

I've this layout hierarchy: ... ... ... Using the Android Device Monitor I've dumped the view hierarchy and I've…
GuilhE
  • 10,723
  • 13
  • 63
  • 94
3
votes
1 answer

Inspecting an Android Activity's own View hierarchy at runtime

Is it possible for an Activity to get to and inspect, ideally even modify, the entire View hierarchy for itself, without knowing IDs of all the views or special access such as instrumentation mode or rooting? E.g. would it be possible to write some…
Cumbayah
  • 4,298
  • 1
  • 22
  • 31
2
votes
2 answers

SwiftUI - How to change hierarchical position of View?

Here's a basic example of what doesn't work: import SwiftUI struct Test : View { @State var swapped = false var body: some View { if swapped { Color.green } Color.blue.tapAction { withAnimation {…
jeremyabannister
  • 2,362
  • 3
  • 11
  • 19
2
votes
2 answers

onTouch() not called for parent layout

I have a layout like this: LinearLayout RelativeLayout(id = test) FrameLayout (From a LIB. id = lib) I tried to add onTouchListener() to test but it doesn't work. I tried: @OnTouch(R.id.test) public boolean test(View v,MotionEvent e) {…
2
votes
1 answer

Set autolayout constraints programmatically

I can't figure out how to fix this: I want to create a match game, where the size of the cards depends on the device. I thought I would create a contentView which I pinned to top and bottom of the rootView with a margin of 20 and alligned it to its…
1
2 3 4