Constraint layout spacing issue - android-constraintlayout

I am designing a layout, but trying to make the space marked in the image a space of 7% of screen. So the 'loading' text always has a minimum of 7% space between the guideline above it. What would be the best way to do this? By using more guidelines and constraining it? Or using a blank space view?

Related

How to resize an NSImageView in an NSStackView?

I'm working on a project where I want the following in an NSTableViewCell:
Image
Text
Subtitle text
The NSTableView is in a window which the user can expand or contract. When the window expands and contracts, the text wraps as needed.
That much is working.
When it comes to the image view, I can't get the thing to resize at all. I don't understand how the text automatically wraps, but images don't automatically scale. I've been working on iOS so long that I might have missed something in how stack views differ between iOS and macOS, but I never had this problem in iOS.
I don't have much code because the text wraps properly without any code at all, so instead I posted a minimal project showing the problem on Github:
NSImageTableViewTest
Some things I tried:
I have to set the width/height of the image view, or the text won't wrap. It seems to me that the reason why is that if I keep the image view unbound, the table view starts at the width of the image.
I tried setting the leading and bottom constraints of the image view to no avail.
I tried setting the constraints of the NSStackView, but that doesn't help constrain the frame of the image view.
Question: do I have to change the frame of the image view in code? I did try that, to no avail.
At this point, I'm stumped and I'm sure the fix is something easy that I overlooked.
Thanks.
The image view doesn't shrink because the default Content Compression Resistance Priority is too high. Set the Content Compression Resistance Priority to (a bit lower than) "Low (250)".

How do I make my label in Unity size to fit its text?

I am working on the credits for my mobile game and I have a license attribution thing at the end that is relatively long. On normal phone screen sizes it fits properly, but on notched phones, a big chunk of the end gets cut off and on tablets, there is a lot of empty space at the top and bottom. I had both the label and the content panel of the ScrollView for the credits set to the anchor preset which is anchored to the top of the parent but stretches horizontally and I tried changing it so that they stretch vertically too and that did nothing. I also tried moving the label's anchors to its own corners (but didn't do that with the content panel's anchors because that's not possible), but that also did nothing. I asked this on Unity Answers earlier this week and they haven't been very helpful. How do I make the text not get cut off or have a lot of extra space?
I eventually just clicked "Best Fit" on the text and now it fits properly. I was worried that it would look bad if it was a different size on different screens, but it doesn't seem to be a huge problem.

How to develop different screen sizes?

I have a private problem and a more general problem.
I have a container with some Text widgets and I set he's height to
height: MediaQuery.of(context).size.height*0.26,
If i'm in big screen(I'm not talking about Landscape mode/Portait mode) the container looks fine, but if I am at small screen I have error that there is no space for the text.
How do I get over it?
And more general question, I've also problem with the space between widgets(big screen there is too much space, small screen there is no space etc)
What is the best solution for this problem(Develop for different screen sizes)

Is there a non hacky way to move the "Legal" Label in MKMapView to the top left corner?

I was using layout margins and adjusting coordinate space to do this, but found that it would constantly break my constraints. Is there a legitimate way of handling this, or do I have to work around the legal label?

resize a uipanel without changing its children's sizes?

suppose that I have created this panel and have modified sizes of the children to my favorable size.
Now I understand that there is some spare space at the bottom of the panel and since I have little space for other panels, I decide to cut this spare space.
But whenever I do all of the children get smaller and thiner!
I know that I can change size of the panel and then resize its children to my favorable size. But is there an easier way in order to not wasting time?
I assume you are using GUIDE.
This is related to resize behaviour. If you follow Tools-> GUI Options you can see the combobox for resize behaviour. Yours is probably set to "Proportional".
If you change it to "Non-resizable", you will be able to resize your panel without affecting children sizes. You can change it back to "Proportional" after you are done.