Frame Layout Tutorial (Android UI)

Frame layouts are one of the simplest and most efficient types of layouts used by Android developers to organize views. They are used less often than some other layouts, simply because they are generally used to display only one view, or views which overlap. The frame layout is often used as a container layout, as it generally only has a single child view (often another layout, used to organize more than one view).

Views that we add to a FrameLayout are always anchored to the top left of the layout. To understand how FrameLayout works please consider the following XML layout-

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android=""


Here is the output of above code-

Frame Layout

In above example we create a FrameLayout and place ImageView inside it, ImageView displays an image (located in res/drawable folder). We can also add multiple views to a FrameLayout , but each will be stacked on top of the previous one.

Be the first to comment

Post a Comment

Recent Posts

Site Stats

Our Apps

Get it on Google Play

©2012-2015 AndroidAspect - All rights reserved | Powered by Blogger

Creative Commons License