I disable Auto Layout and Trait Variations cause I want to fix my Objects, having lot of buttos in the storyboard. But the problem now, with XCode 8, is the layout elements are moving automatically randomly! Only few points, but never keeps the layout in the position or size I set. I'm loosing lot of time trying to keep my storyboard in order.
Please ... anyone knows how to solve it?
Related
I'm having problems with the constraints on xamarin.ios, at the base I have a scrollingView and inside it many elements wedged into vertical and horizontal stackviews, sometimes more stack views overlap. I cannot post code because the constraints are set by the .storyboard file. When I have to set the constraints, then anchor constraints to the scrollingview by the stackviews, the problems begin, any point I insert and in any axis is not associated, but the current distance is set (constraint given by the position of the object in the viewcontroller) every now and then it becomes negative sometimes the bond remains for a few seconds then returns to mess up. I'm hoping it's a xamarin bug, so now I'm re-installing the IDE to remove any doubts, have you encountered similar problems, or scrolling view and stack layout view are not directly compatible, in case how did you solve the objects they must be necessarily grouped in a scrolling view.
I'm generating Views inside FlexBox layout by pressing the Start button. As you can see every item on even line has random size. It works almost as it supposed to be but there is a problem, I need to get rid of vertical gaps between two vertically adjacent views. I've tried all properties of Flex Box Layout but didn't find one that can help to solve my problem. I will be happy if you help me to solve this problem.
I've solved this problem. If you have the same task you should use Relative Layout and its' flags inside your android code. It'll give you all control under the positions of Views. If it will be necessary I can expand this answer to provide more detail.
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.
Okay, so I'm really trying to do a lab for a class thing and I don't get why I can't have a textbox that takes up the width of the phone and a button that takes up the width of the phone on the bottom, but I don't know why that is? Here's a picture of what I have.
I know this is a noob question but it hasn't been addressed yet on the online course I'm taking and I really need an answer because I wanted android development to be as easy as .NET on windows.
Well anyway here is one picture:
Also here is the other picture:
Notice if I try to make one element bigger, it leads to it pushing the other one out of the activity, I want to have one activity with both elements taking up the entire width of the phone.
Does anyone know what I'm doing wrong?
EDIT: I'm using Ubuntu 14.04 not Mac OS X.
Your controls are children of a LinearLayout with android:orientation="horizontal". This means that the parent ViewGroup is aligning them horizontally; you cannot get the children aligned vertically in this configuration.
If you change the attribute to android:orientation="vertical", you will achieve the result you're looking for.
I strongly suggest getting yourself familiar with the default set of layouts available in the Android SDK by reading this official guide.
Edit : Please refer to this answer for placing views at bottom of the screen.
When you use a android:orientation=horizontal orientation in the layout, the views are stacked/placed in a single row. Since both your views have their width set to fill the screen, only the first one is shown/seen.
What you want is the vertical orientation. This places the views in a single column, one below the other. The width set to fill-parent will allow you the view to occupy all available space.
Official documentation on views : Layouts : Android Dev Docs
Understanding Android Layouts : Techtopia
Android Layout Tutorials : Learn-Android
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".