# Improving Android Layout Previews with Sample Resources and Preview Attributes

DevFeed: [Improving Android Layout Previews with Sample Resources and Preview Attributes](<https://devfeed.tech/articles/tools-title-layoutpreview-39027.md>)

Original publisher: [Read original article](<https://vladimirj.dev/layout-preview/>)

Author: Vladimir Jovanović

Published: 2018-02-18T09:44:00Z

Content type: tutorial

Language: en

Sources: [Vladimir Jovanović](<https://devfeed.tech/sources/vladimir-jovanovic.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [layout](<https://devfeed.tech/topics/layout.md>), [ui](<https://devfeed.tech/topics/ui.md>), [XML](<https://devfeed.tech/topics/xml.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [android-layout](<https://devfeed.tech/tags/android-layout.md>), [coding](<https://devfeed.tech/tags/coding.md>), [design](<https://devfeed.tech/tags/design.md>), [layout](<https://devfeed.tech/tags/layout.md>), [ui](<https://devfeed.tech/tags/ui.md>), [xml](<https://devfeed.tech/tags/xml.md>)

## AI overview

This tutorial explains how Android developers can improve XML layout previews using sample resources and preview attributes. It covers showing representative text and images, previewing repeated items, configuring horizontal orientation, and displaying menu items without adding runtime view state.

## Source excerpt

As every Android developer, I also started building my layouts by hard-coding values into them. Later on, I have realised that I should...