I know it must be a dumb question, but Android Studio has so many options that confuses me. I want to use the whole editor section and not the half as shown in the following link.
https://i.stack.imgur.com/4IYln.png
I'm new into this and willing to learn Flutter. Thank you! ^^
You can set the value for Hard wrap at in the Android Studio Preferences to a value higher than 80. But even very high values won't let you use the full width of your editor for the sake of common Flutter code style. If a line gets too long, you might want to consider breaking it apart to make it easier to read and understand. Or, regarding Flutter, flatten the widget nesting by extracting parts to custom widgets.
You could also use the remaining space to display the file explorer or to view two files side by side.
You are using the whole editor section. That's a hypothetical line that is adviced to keep your codes on left side of it.
Related
I've recently switched from eclipse to IntelliJ IDEA for Android development. I'm not missing any features, beside the rather helpful designer preview in eclipse. I populate certain views in my activities at runtime, there are no texts defined in the corresponding XML files. In eclipse, it looks like this:
It fills the empty views with placeholder text which is nice to get a rough impression of the layout without having to start the app. But in IDEA, the designer looks like this:
The views are empty, and it's difficult to even see them without selecting them in the Component Tree. I haven't found anything in the options, is this missing from IDEA or did I miss an option?
It's not possible right now, but it would be nice to have, I've created a new feature request, please vote.
I am very new to Android development and am having some trouble. I am creating an XML file using Eclipse, both the Graphical Layout feature is what I'm having trouble with.
Also, I am working in Android 2.3 for compatibility reasons.
I am wondering if there is a layout which enables me to place buttons or text fields or any attribute where I want to put them. This may sound stupid, but it seems that every layout has some sort of order in which it lets you add attributes, and whenever I try to drag them elsewhere on the layout things just get very very messy.
If what you want is an AbsoluteLayout, this has been deprecated since Android 2 (IIRC). You can try using the RelativeLayout, which let you position freely your widgets. Else, if you only use LinearLayout, then yes the widget will be positioned in a strict way.
use Relative Layout. I recommend that you read up on Android layouts so you understand why, what and hows of Android way. There are some good tutorials that I found helpful. TutsPlus: Android Layouts
There is also a very good video from Marakana.
Marakana: Android Bootcamp
If you are just starting out with Android check other tutorials/videos on Marakana. They are a very good resource for beginners.
Working with Android for the first time, I've blocked out a layout using the relative layout and laid down some buttons and text widgets how I like them. However when I go back to rename the IDs the layout goes all crazy moving elements around and in general destroying the hours of work I spent laying them out.
Does anyone know how I can rename the widgets without Android destroying the positioning for widgets in the Relative Layout? Is this some "feature" of Android? I can't imagine why it would be hard for the UI builder to handle simple renaming of a widget ID without destroying the positioning information.. Do I have to use an external text editor and modify the XML files directly? Ughh I hope not.. I'm using Eclipse IDE.
You can use find and then replace all to change the names every place that they appear. Shouldn't take anywhere near an hour if you're dealing with a small layout.
In general the graphical UI creator that is currently included with the Android SDK is not so great for creating anything but very simple layouts. In my experiences (which were a long time ago, it may have gotten better since) it was terrible with RelativeLayouts.
If you have not modified your xml directly then it is time that you jump in and start learning to do it that way. You'll find that you have a much greater level of control over your layout, and once you get the basics figured out you'll probably be able to create quicker using raw xml then with the graphical tool anyway. I do wish that there were a nice GUI creator for android out there, the best one that I've ever come across is Droid Draw which I found to be better than the one included with the SDK, but still not as good as I was hoping.
To modify the xml directly you don't need any additional text editors, you do it inside eclipse. Open up your layout file and at the bottom click on the tab that says "Source" when you want to switch back to graphical (good to see the changes that you make to the xml graphically) just click back to the tab that says "Design"
I am trying to use the Graphical Layout editor to make my app, so far so good but now I am in this problem:
I want the grey small textview to go a little higher but no matter what I do this isnt happening. How do those apps in the market have such beautiful GUIs when I can barely create a simple one? What are they using that I am not? :P Thanks.
Well, To fine tune the UI, you will eventually have to edit the generated XML. It would be good if you start getting your hands dirty with the XMLs. Please post the XML and then anyone would be able to suggest what changes to make.
I think you would probably reduce the padding or margin of the textview above.
Have you tried editing the XML and decreasing the top margin of the text? Or decreasing the bottom margin of the view above the text?
New Eclipse layout editor for Android devices has a lot of new gui elements, is there are any tutorial on how to use it?
Updated: I was just trying to add HorizontalScrollView to layout, and don't see any feedback from a screen. Should I just use xml to edit layout, and use visual view just for verification?
The elements can be found in the android.widget package, so I would recommend to head over to
http://developer.android.com/reference/android/widget/package-summary.html
have a closer look at your GUI-element of choice and just try it out.
Or, alternatively google for example code snippets - I'm sure there is at least one for each element
The editor itself is very self-descriptional, but detailed informations you can only get by offering more details of what you really want do.