Xamarin ios designer left & right margins - xamarin.ios

Im using xamarin designer with autolayout and cannot align the UITabBar to the left & right edges of the root. There is always a small margin how to remove it?

If you are in Xamarin using Visual Studio I finally discover how to tackle this annoying problem.
Click on the widget or view in the storyboard. In the properties window->layout you can see the constraints. Click on the constraint.
Before I was using -20 for constraints:
Now I fixed by having a constant of 0 and changing the constraint configuration:
Just remove the selection on the "Relative to Margin" checkbox.

Set the constant to -20 on the Trailing Margin Space and Leading Space layout elements to the Superview. I have no idea whether this is the preferred way to do this but it worked for me on my Table View.

Xcode has an option not use margins when a constraint is added.
In the iOS designer in Visual Studio, there doesn't seem to be an option when a constraint is being created.
Xcode & Visual Studio constraint margins
A work around is to create the constraint and then edit it after it has been created.
On another note, you might review why you're not using a UITabBarController which would place the Tab Bar correctly for you.

You need to uncheck the Constraint to Margin option when giving constraints for left and right using auto layout
Link1
Link2
Auto Layout guide

Related

I can't move any element in the constraint layout through the design Tap, I can't move the item and drag it, what is the problem?

As you see in the image I am trying to set the constraints of the TextView but I can't in the Android Studio Design mode.
Is there a solution for my problem?
Change your settings to code view.

In Android Studio How To Remove Guidelines?

I'm learning Android Studio, so I clicked a few buttons to add vertical and horizontal guidelines, but how to roll back ? In the following image you can see how they look, but I can't figure out how to not show the guidelines ?
I figured it out, select it, make sure it turns blue, then hit "Delete" key to get rid of it.
Select the guidelines or just go into the COMPONENT TREE window below the Palettes and delete the guidelines you want.

Remove storyboard left and right padding on IB

I'm trying to remove the seemingly forced left and right padding on a storyboard, need to anchor my view on the border on the Storyboard. Doesn't seem to give me the option to anchor on the border in the interface builder.
Most probably not best practice, but the design looks weird with this padding.
How can I remove the white space on the left and right:
Update:
I have checked the constraint value, its bound at zero on superview.
It only works if I use -20 and 20 for trailing and leading. Need to change superview itself?
When your on the storyboard select the control you want to have edge to edge, and in the properties window if you select layout you will see the constraints that you've added.
You would want to double click on the 'leading margin space'and set it's 'constant' value to 0 (this can be a bit buggy sometimes, so it may show 0 already, simply remove the 0, re-enter the value 0 and save)
Finally repeat the first step and select the 'Trailing Space' constraint and do the same thing.
once done press on the square icon which visually adjusts the control into it's new constraints and it should be edge to edge.
If you are in Xamarin using Visual Studio I finally discover how to tackle this annoying problem.
Click on the widget or view in the storyboard. In the properties window->layout you can see the constraints. Click on the constraint.
Before I was using -20 for constraints:
Now I fixed by having a constant of 0 and changing the constraint configuration:
Just remove the selection on the "Relative to Margin" checkbox.
Open your Storyboard using Xcode and remove the existing Leading and Trailing constraints and add it freshly by Unchecking the Constrain to margin checkbox while adding Constraints.

Switching TabHost Tabs in Android Studio UI Designer

How can I switch between the tabs of a TabHost in the UI Designer for inserting content? Is there a keyboard shortcut or something else
I found a way to visualise any tab using TabHost in the UI Designer. Is probably not the best way, but it works.
1. Go to the Component Tree, where you have all the elements of the UI.
2. Inside the FrameLayout that TabHost automatically creates for you, there are the tabs.
3. If you change the order of the tabs just drag and dropping in the Component Tree, you get to see the one that is placed in the first position.
UPDATE:
According to this answer there is no way to change the tabs of a TabHost. That question refers to IntelliJ; I don't know if it applies to Android Studio.
Also, it seems that TabHost has been replaced by FragmentActivity and ActionBar. See Android how can i replace the deprecated tabhost? for a discussion.
It is defined as "Select next Tab in multi-editor file" in Settings -> Keymap.
On Windows it seems to default to CRTL+SHIFT+RIGHT/LEFT or ALT+SHIFT+RIGHT/LEFT. On my Mac it defaults to CTRL+SHIFT+RIGHT/LEFT.
Note that Studio doesn't allow the default Keymap to be edited so you will first need to copy the default and give it a new name.
Also see Shortcut to switch between design and text in android studio.
By mouse, select the FrameLayout then long left click on any space in it.

How re-enable design palette in Android Studio

I recently made the switch to Android Studio as my default IDE for Android development. When designing my UI I normally use the palette in the design view to assist in arranging the widget on the preview screen.Recently something weird happened, It just disappeared and I can't seem to re-enable it. Normally I would see the little Palette button on the side but now its gone. When I open another project I see the palette but not show this current project I'm working on.
When I open another project in Android Studio I see the palette tab.
I've just figured this out! If you double click on your .xml file tab at the top it will maximize the designer window. Then on the left you can drag the window to shrink and it will reveal the palette. Then just click on the tab on the left to open the project window.
try the Design/Text tabs in the lower left of the layout window
The palette can be shrunk to 0 width. This can be expanded by hovering next to the left edge of the design window, and finding the right-most expand position.
If you have only the designer and the properties showing and the Properties is on the right, you can get the palette back by switching to a left or right view.
Right click on the .xml file tab. Select "split vertically". This will open another Design that shows the palette again.
Android Studio 2.3.3, and the answer I was looking for:
Window -> Restore Default Layout (Shift+F12)
First Close All The Tabs Then Open res->layout->activity_main.xml
you will able to see design tab at activity_main.xml
Try to switch between Design/Text tabs at the bottom left of the editor.
You must have something in the layout resource highlighted. I also had to compile without an error.
My solution was traversing
src->main->res-layout->content_main.xml
then open content_main.xml
You have to be in the 'Design' tab (as opposed to the 'Text' tab) at the bottom of the middle window (the one that shows the phone).

Resources