iOS Layout Constraints - layout

I’m configuring the layout for the UIView in the photo (photo in the link because I don’t have the points to upload it) and I’m having trouble configuring the constraints of the marked elements, which are the constraints for the two lines of buttons, the label that is between them and the label that is on the middle of the large image. The other elements are working correctly. I’ve tried different things but still don’t get it right. I’ll appreciate if you could help me with which are the correct constraints I have to add.
https://www.dropbox.com/s/6v1fsik9duvn0d7/Photo%20Apr%2023%2C%208%2042%2021%20AM.jpg?dl=0
Thanks

Added the buttons inside a view and add the constraints to the view and the buttons. It is working correctly now

Related

FlexBox Layout Android. How to delete vertical gaps between views?

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.

Why can't I size android components at will?

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

C# ListView Image/Icon margin/padding

Is it possible to reproduce what is on the picture below in ListView, padding/margin icon to the right.
http://img801.imageshack.us/img801/4043/listview.png
My first question here, so I couldnt post the picture here.
Basically I need to move the ListView icon more right, I am reproducing file/directory browser, so the fails that are in a directory need to be below them and slighty right like in the picture, I have everything else figured out.
You should be using a TreeView control:
http://msdn.microsoft.com/en-us/library/1dtsdfkx.aspx
But if you insist on hacking a ListView to render this way, you'll simply have to take over drawing each row yourself. You can do so using the OwnerDraw property, though be warned that there's a lot of corner cases here so you should do a lot of reading to see what people have had to deal with when implementing this:
http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.ownerdraw.aspx

Highlighting an item in the actionbar when in a certain activity when using ActionBarSherlock

I'm putting the final touches on an application that Ive been working on for quite a while and while I understand how to restyle existing components by using inheritance Im coming up blank in my search on how to accomplish this last thing.
I want to apply a custom color/image behind the text or icon representing the current activity I am in. This would be similar to how the tabs have the highlight underneath them while selected. I am already using the tabs and have figured out how to change the image resource that is the little underline in the tab bar. Now I just need to accomplish the same look for the action items.
Ive overlooked the actionbarsherlock library for the past day and a half but I dont see anywhere that I could do what I want to accomplish. I have to imagine that such a thing can be done but like I said before so far Im coming up short. Any help would be much appreciated.
I figured out a simple way to do what I asked earlier. I just created a square shape in xml, put text over it, assigned it the gradient and color I wanted and assigned it to that action item I wanted highlighted in the activity i was in.

How to stretch and scale a single child in a container(e.g. panel, groupbox) to fit different resolution screen? C#.net

Basically, I have an usercontrol as main container, inside which I have a few groupboxes and buttons. But, my interface controls will not be resized and positioned properly as what I expect in design interface.
I've already tried to change the anchor and dock properties but none of them serve my purpose.
I searched online and found something called viewbox in WPF, I'm wondering if there is something like "viewbox" in visual studio 2010?
Please help!
Try using TableLayoutPanel container and put your controls in it. It is similar to the idea of table in HTML where it is divided to rows and columns each one of them can be set to either a set of pixels or a percentage. Usually if you want to use re-sizable form, usually you should have a control that will give you good results when stretching such as image, multiline textbox etc... In addition, put the dock property to fill to get the stretching you want.
I hope this info was useful for you.

Resources