Android studio just downloaded and gives an error - android-studio

I have a problem with android studio. I just downloaded and when I try to add something the app for example a button or text I get the following error:
This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as layout_editor_absoluteX). These attributes are not applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections.
Well I haven't actually done anything... Download it and instantly error...
After research I found that in the Layouts tab there is an option called ConstraintLayout. I double clicked on it and then I added the button and a warning appeared named hardcoded text and it says:
Hardcoded string "TextView", should use #string resource Hardcoding text attributes directly in layout files is bad for several reasons: * When creating configuration variations (for example for landscape or portrait)you have to repeat the actual text (and keep it up to date when making changes) * The application cannot be translated to other languages by just adding new translations for existing string resources. There are quickfixes to automatically extract this hardcoded string into a resource lookup.
There is a suggested fix but it wont change anything...
Anyone know what to do or it is just my luck...…………...

Just go to Design Tab and on Layout right-click on the layout you've and select Constraint layout --> Infer Constraints.
If you don't find this tab Infer Constraints then you've another android version so just go to Design Tab and click on the button you added you'll find a toolbar appeared you'll find in it an icon for a Magic Stick just hover on it you will find it's Infer Constraints click on it.

Related

Alloy: different instances for integer

I'm new to alloy and i'm doing a little project. In the project i have some instances with different attributes that, with magic layout, i can put in the instance when showing the model. Is there a way to do the same thing with integers? I attach an image that i hope can describe better my issue, in the image you can see that the attributes occupied and type are in the socket, but the socketID no. So, i also wanted to put the integers (for example) in the socket to have a show without some useless instances/relations. I tried with the same approach used for the other attributes but is not working. I think it's because is an integer and not a custom sig.
I hope that the question is clear and thanks a lot in advance.
Not sure it's due to Magical Layout, unless they have implemented a special treatment for ints.
Anyway, the solution is to customize the "theme" yourself:
open the theme customization panel (e.g. by clicking the Theme icon).
Now two trees are displayed on the left, representing (top) the signature hierarchy and (bottom) all relations in your model: click there on socketId and then, at the top of the left panel, tick "Show as attribute" and untick "Show as arc", then apply your new theme by clicking Apply (top right), then click Close to close theme customization.

Resizing the actual Tabs in a (Godot) TabContainer, is it possible?

Given some Tabs in a Godot TabContainer, I'd like to resize the actual Tab-elements (not the container they're a part of.
Given that so many things are customizable, it seems like these would be too, but so far I haven't found how. The question How to resize a Tab, sounded promising, but the "Custom Style" that it referred to, doesn't seem to exist - or at least didn't appear in a help-search.
Update: The given answer got me closer. There's a lot of variables, it's definitely not production-ready, but it does at least, appear possible to modify the size of Tabs. And just realized that one of the variables is Content-Margin, I had edited just Margin, to create this picture.
You have to learn about themes in Godot to resize your elements.
In the editor select the TabContainer, in the Inspector search the Theme property, and in the Theme variable below you can load a theme or create a new one for your project.
If you create a new theme there will be a file with a extension ".tres". Double click on that file to edit the aspect of different elements for your project.
I will try to add more detail. If you edit your theme file ( .tres), with the Type: TabContainer, you can override the multiple StyleBox of the Tab. I tried with the tab_fg, click on the plus sign, later in [Empty], New StyleBoxFlat, click on the new StyleBox Flat created in the field, and edit it in the Inspector. Edit the Expand Margin values, and also the Content Margin values.
You can also increase the font size, overriding the font with a New Dynamic Font, selecting it and editting it in the Inspector, in settings-> Size.
You can find further info in the UI tutorials section on GUI skinning

ST3: Find text results in panel instead of a buffer

I must have hit a setting in ST3 and caused my program to display results in a panel instead of in a buffer. How do I get it back so that find-text results go into their own tab? I've done some digging around but I can't find what I did.
In the Find in Files panel, there is a series of buttons to the left of the Find field, and the right most one of those is the one that controls whether the find results show up in a panel or in a buffer.
Note that the button may look different in your version as it appears that you're using a different theme (the image below shows the default theme). You can verify that you have the correct button based on the tool tip text.

android studio: way to make validation markers thicker?

In Android Studio, is there a way to change the thickness of the error validation markers in the right gutter? They are very thin and, for me, it is difficult to discern the colors. They tend to all look greyish.
the result is I'm having trouble seeing which are warnings and which are errors.
I don't know if you can "change the thickness" since it is representation of the entire file - it is more like a "heat map" than a navigation tool. Making the window taller would make them "thicker" and beyond that you have display and navigation options, so that you don't need to see individual indicators.
To change what is displayed (which warnings and errors are highlighted), go to Analyze -> Configure Current File Analysis then in the pop-up click on "Configure Inspections". Here you can select which warnings and errors are indicated. You can create profiles, etc. to your liking.
For navigation, you should be able to navigate to errors only and skip the warnings, using F2 (or shift-F2) on Mac anyway.

Visio stencil/shape text box is hidden - need shown

I've downloaded and am using the VNX 5300 stencil/shape from https://download.emc.com/downloads/DL38235_VNX_Visio_Stencil.zip (I had to create a free account to download it).
I can hit F2 to edit the text, as normal, but it will not display. On other downloaded shapes/stencils, if I right-clicked on the shape/stencil, I would have the option to hide/show shape text, but it doesn't exist on this one. I have looked in the shapesheet data, and "hide text" is already set to false. In developer options, the text is not protected.
Is there a way to force the text to display? I hope to learn how to fix this problem, rather than band-aid it and merely add a second text box.
This stencil was created oddly. I had to right-click and ungroup from master. Then I had to, again, right-click and ungroup a second time. After the two ungroup actions (from its original format--I did NOT group it to anything, whatsoever), I was able to edit the text and see it, but cannot move it. The shapesheet then showed the "text transform" options so I can pin it, but again, cannot move it to the location I want.
I then had to completely frankenstein and butcher the shapesheet text transform to barely get it moved where I wanted. Adding a text control handle was not possible.
This is a faulty stencil made by EMC, apparently, as I have not had these problems with any of the other brands' stencils I've downloaded.

Resources