Google+

Android4Beginners.com

Apps development for Android step by step

Lesson 2.3: How to put layout into layout to create advanced app interface (layout tree in Android)?

In the previous lessons we were using LinearLayout with TextViews inside. This time we would create more complicated structure: layout built of other layouts. LinearLayout could contain many LinearLayouts (or other types of layout), and they could contain more layouts and so on. But be careful – too complicated layout tree could negatively influence performance.

Read More

Lesson 2.2: How to use margins and paddings in Android layout?

There are two layout options that could lead to similar effects, but generally have different application: margins and paddings. Both define free space, but margins work outside an element boundaries and paddings inside an element.

Read More

Appendix D: Comments in XML and Java – it’s crucial to create a documentation of Android app

This would be short, but very useful appendix. When you’re programing you know at that specific moment very well what for are some variables, why are you using some methods, how are you going to implement some classes and so on. But two weeks later – believe us – you will spend as much time on trying to understand your existing code as developing new one unless… you add comments.

Read More

Lesson 2.1: How to build Android app with simple, but powerful LinearLayout? Plus layout orientation as well as size and weight of elements

If you created app based on previous lessons, you had already contact with layout tag, though we haven’t analyzed how it works. Default layout for new app in Android Studio is RelativeLayout, but we will start with another layout type – called LinearLayout. It is easy to use and still very helpful in many situation.

Read More

Lesson 1.4: How to change a color of text and background in TextView?

From the previous lesson we know how to display a text on Android device’s screens both using XML layout files and Java code. Now it’s time to format that text. We start with font and background colors, but beside a standard text color there are also other options, like links, highlight and hint colors. Moreover we would check current colors.

Read More