Xcode 5 iOS 7 - subviews have lost positioning constraints - layout

I was moving stuff around to get it to work in iOS 7, then the machine crashed (not unusual with a new Xcode installation). Now the subviews don't have their positioning constraints any more. Is there a way to get them back? Don't care if it's just the default constraints, right now elements are all over the place. If not, is there a way to get everything into auto layout? Some elements appear to be spring and strut aligned, others are auto layout. Probably the crash messed it up.

At the bottom of the main edit window is a toolbar with something that looks like a tie fighter.
┣●┫
Click that, then in the menu, select "Reset to Suggested Constraints".

Related

Component tree / Attributes missing on preview

Unlike shown in Introduction to the Layout Editor, my preview window is missing Component Tree and Attributes view:
Where can I enable those?
You are not looking for preview, but design view! Enable it by clicking "Design" button on bottom left of main window.
(I asked and answered this question because I spent half an hour trying to fix what wasn't broken! I even reinstalled Android Studio, only to find out later that I was in the wrong view -- and I don't want others to make the same stupid mistake.)

Excel scrollbar doesn't allow screen to update until you "drop" the scrollbar

This is hopefully pretty straight forward, but after an hour of searching online, I couldn't find anyone else complaining about this issue. Perhaps I just haven't found the right wording to describe it.
My company recently switched to Excel 2016, and I HATE the way the scrollbars work. If you drag the scrollbar with the mouse, your current view freezes in place until you 'drop' the scrollbar. Then the screen suddenly jumps to this part of the spreadsheet. It used to actively display the spreadsheet as you dragged the scrollbar around, so you could see everything as you moved around.
I constantly work with enormous spreadsheets where I need to find specific sections quickly, and now that the scrollbar has become useless, it takes me much longer to navigate.
I understand you can use the arrow keys, or different shortcuts to jump through a spreadsheet, but I found the scrollbar very useful when moving through very large files. I can't be the only person who wants this functionality turned back on, but I can't find any information on it, or any settings I can switch.
This fix works for me. In Win 10 open Control Panel. Navigate to: Control Panel\All Control Panel Items\Ease of Access Centre\Make the computer easier to see. Near the bottom in the section "Make things on the screen easier to see" is a tick-box: "Turn off all unnecessary animations (when possible)". This was ticked for me by default so I unticked it and clicked the Apply button after which the scroll bar in Excel started to work as it does in Win 7, i.e. the cells in the background move as you drag the scrollbar left/right and up/down. Perfect.

Layout issues after updates to xcode 9

I've updated Xcode 8 to Xcode 9, and now .xib files on main screen not looking good.
Buttons and Labels not fit in screen and looks like it was cut.
Someone familiar with those issues?
I have a similar problem with multiline labels inside UIStackView. If you set label's amount of lines to anything other than 1, stack view goes crazy and layout looks totally broken in interface builder.
I've solved it by explicitly adding a constant width constraint to the label, but checked "remove at build time". So that it looks OK in interface builder but doesn't interfere with app's behavior.

Android studio - preview when editing text has disappered

When I first started using AS I really liked the edit layout feature. I like the way it shows you a preview on the right of the screen when you are editing the XML.
This seems to have disappeared - how do I turn it back on? It's not a show stopper, but it was a nice feature.
The previewer is way better than the clunky Eclipse one.
There should be a tab called "Preview" on the right side of the screen.
If you can't see this then click the little square on the bottom left of the screen and it will appear.

Strange behaviour in my android app (Android 2.3.5) - Things get inflated wrong

I've been experiencing some very strange behavours in an app I'm developing. The app is not very advanced, it stores a couple of places in a sqlite database and is displayed in listviews, on a mapview etc. So, when browsing through my app after deploying it to my phone everything works great, but after a while one listview doesn't get inflated. A scrollbar appears as if the items were there but I can't see them. I push the back button to close the app. When revisiting the app my first view, which has two buttons, gets all messed up. The buttons fill the viewport and the background disappears etc. I can't figure out what's wrong.
Anyone else facing these problems? My phone is a HTC Desire HD with Android 2.3.5
The app is pretty "layout heavy", if you know what I mean. The listview items has custom background images, I'm using custom fonts etc. But the app is running smoothly up to the point when it freaks out and displays/don't display everything wrong.
My first thought is there is some kind of memory issue, ideas?
EDIT:
I believe this might have something to do with defining and using #00000000 as transparent color. Use #android:color/transparent instead.
SOLUTION:
So after doing some testing I found that what I previously mentioned in the edit really is the cause of this problem. I had defined the transparent color in my colors.xml as #00000000. This seems to work, sometimes... And other times it grabs a drawable instead, but not a drawable that is named "transparent", it grabs ANY drawable. Weird but true.
After some testing I finally found the cause of this problem. I had defined the transparent color in my colors.xml as #00000000. This seems to work, sometimes... And other times it grabs a drawable instead, but not a drawable that is named "transparent", it grabs ANY drawable. Weird but true.
So to fix this problem you should use #android:color/transparent instead when you want transparency on, for example, a view background.
If there are memory errors you should be able to catch them in logcat. You'll get "VM failed on xxxx byte allocation" messages (or the like).
Silly/stupid answer: often when I run into layout issues within my app, it's because I needed to do a clean build after having changed my layouts. You might want to start there.
Edit: You might also try the emulator, and if you suspect memory issues you could start the emulator with a small heap to force the issue to occur sooner. You can also check your heap usage in DDMS or with the Eclipse MAT to see if it's leaking.
I was experiencing the same problem on Galaxy tab even with #android:color/transparent. Was able to fix it only by replacing android:background="#color/transparent" with android:background="#null".

Resources