--ADVERTISEMENT--

Absolute layout is less flexible and harder to maintain than linear layout, relative layout, table layout, etc. To specify views inside absolute layout, you have to use android:layout_x for x-coordinate and android:layout_y for y-coordinate. In this tutorial, I will show how to use absolute layout in your android application.

Related:
Android Linear Layout
Android Relative Layout Example
Android Frame Layout Example
Android WebView Tutorial with Example

Android Absolute Layout Example


Add following xml code in your layout file.
res/layout/absolute_layout.xml

Default code of java activity file looks like this.
src/MainActivity.java

And finally, following is the strings of strings.xml file.
res/values/strings.xml

Output:


Android Absolute layout Example
Android Absolute layout

Post a Comment

Powered by Blogger.