Learning xml for android development [closed] - android

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Is it recommended to learn xml to create user interfaces for android apps?
It's pretty easy to do in the layout editor of android studio, but I feel like it would be better to learn to write the layout code myself so I'm not dependent on the editor.

Yes, it is recommended to learn the xml.
You won't be able to use the visual editor for every layout you use. When you are using the visual editor it may use hardcoded values and add some unwanted attributes, giving the users an bad UI depending on their devices.
Currently, the only layout that using the visual editor might be a good idea is the ConstraintLayout. But even for it, you might need to fix some generated xml code.

I think it's ALWAYS important to learn the basics of any "coding or language" instead of just playing around with the IDE, this should help you in the future for looking for errors or any changes. In case of XML it will help you to use it in other programming languages too.

Related

Which is best way to design UI for android (Coding or Drag & Drop)? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I'm learning Android development in Android Studio. My question is that what is the best way to make UI for Android apps. I'm right now learning coding to make the UI of apps. It's a hard or time-consuming process but I find that this is another way to create UI of Android apps via the drag or drop feature. So, I want to ask which one should I choose to create UI of apps ?? because I want to work as an Android Develper.
Thanks yo
Drag and drop are useful when you don't have to make a good/presentable UI, You are just in hurry to check/test something. But for long term or to make reliable UI, I'd suggest you go with writing code in XML. This helps you understand the concept of how things stick to each other and you can make changes easily when needed. All the best.
Try Constraint Layout ,It's very flexible and will help you understand the concept of constraints.
If you want to become an Android developer, you have to practice a lot, the drag and drop feature on the xml layout design is very useful, but it would be nice if you also have to master the attributes and components in the Android layout. It depends on usage, but I would rather write the xml code directly to better understand the points of layout on Android. Keep learning and keep up spirit

Do I really need to learn xml for android development? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am a Python programmer and I want to learn android app development. My million dollar question is, do I really need to learn xml? Can't I just use the design tab in android studio and drag n drop elements to make the design?
Well well it should be noted that whether any technology is used in certain IDE it would be good to have some background knowledge or at least know what is it for..
Overall is not hard to learn XML at a functional level.
What is it?
A Xtensinve Markup Language which basically work with tags, it was created for be self-descriptive.
<deliveryTag>
<to>Michelle Obama</to>
<from>Barack Obama</from>
<note>Happy Birthday!</note>
<type>First Class</type>
<package>Regular Size Box</package>
</deliveryTag>
What is it for?
Designed for carry data, and have it well-organized of course.
People really loved how it simplifies the data sharing, transport and availability eventually it became one of the standards cross-platform.
Finally..
XML was designed to carry data -> it focus on what data is.
HTML was designed to display data -> it focus on how data looks
Both of above are NOT programming languages but languages for structuration.
You will have more control over your project even if you drag and drop, at some point you will note that Android Studio demands to fluently use XML in many parts of the software development cycle.
Yes you can just use drag and drop editor, all attributes can change there, but when u face with an issue, you can't find your answers in Here because all of android developers work with xml.
It's too easy to learn, don't afraid of it.
You can use the design tab for constructing the application UI, But for complex design, it's not advisable.

Android Studio UI use design or text? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Kind of new to programming, especially with apps
In Android Studio, which is the 'proper' way of designing the UI? The drag-and-drop or manually through code? (Design or Text)
Also, is AndroidStudio the best way to code for apps?
Sorry if its a silly question, new to this stufff
Drag and drop may make a lot of sense when combined with appropriate coding in xml. As #Rai said, it is important to learn how things work via code in xml - but I would like to add that learning things in xml will make the transition to editing views programmatically (dynamically in your java classes), much easier.
Sometimes, however, such as when you are using a constraint layout (a more advanced but very useful layout to use that improves performance in many cases), it is a lot more efficient to get the look you want in the design tab. Check out this tutorial: https://developer.android.com/training/constraint-layout/index.html
In general you should make sure you UNDERSTAND what you are doing when you are making android apps (and coding in general), because if you are just messing around in a design editor you may end up doing things that slow down your user experience and can be done more efficiently. As long as you understand what you are doing (and it is legal) doing whatever is efficient for you as a developer and for your user experience is what is 'proper' - it is an engineering disciple after all.
You should use android studio 2.3x when you are starting out. It used to be true that eclipse was used, but now Google wants you to transition to android studio.
You should not rely on drag-and-drop. Its better you know manually
what a code does before you use drag-and-drop functionality. For
me in android drag-and-drop is not that usable. You should learn all
the attribute, properties and know the relationship between views by writing it manually rather than
using 'drag-and-drop' and ask yourself at the end how UI works and
rendered.

What are the advantages and disadvantages of using XML design vs text tab in Android studio? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
It should be easier to use the design tab when designing an app, as you can drag and drop and it is more intuitive, but it seems many developers rather prefer to use the text tab (write the design in code).
Furthermore, in the Udacity course videos I'm currently watching they teach you to design the app using code.
Any special reasons why one is preferable to the other?
In my opinion you should omit using designing your layouts with the visual editor as much as you can. You might be tempted to use it at the beginning of your "android journey", but it won't do you any good in a long term.
Using text editor will basically make you understand layouts. How they work, how Views influence each other. If you learn that, I assure you, making a layout with the text editor will be much, much faster than using the visual designing tool.
I personally never use this tool (the visual one) for creating a layout. Sometimes I'm just peeking at the Preview window (while writing in a text editor) to see if everything goes as planned.

What is better: add your views using XML or code? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What is better for performance in Android application: add your View-elements using XML or Java code?
Difference in performance is not really observable, but for developing sake its better to keep it in XML. Then it's easier for You to develop adaptative UI supporting many screens. What's more it seperates code implementation from designing UI, what is always a nice thing and makes your code easier to read.
As long as you declare the XML layout properly there is no noticeable difference.
But i will suggest to use the XML because using that you can actually show what the layout is going to look like and it give you more clear idea about your UI.
One more advantage is that when you are giving the multiple resolution support for you application UI it will help you a lot.

Categories

Resources