# How To Make An Android UI Part 2: Java Code

DevFeed: [How To Make An Android UI Part 2: Java Code](<https://devfeed.tech/articles/how-to-make-an-android-ui-part-2-java-code-22816.md>)

Original publisher: [Read original article](<http://androidessence.com/how-to-make-an-android-ui-part-2/>)

Author: Adam McNeilly

Published: 2015-12-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Android Essence](<https://devfeed.tech/sources/android-essence.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>), [XML](<https://devfeed.tech/topics/xml.md>), [ui](<https://devfeed.tech/topics/ui.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [code](<https://devfeed.tech/tags/code.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ui](<https://devfeed.tech/tags/ui.md>), [user-experience](<https://devfeed.tech/tags/user-experience.md>), [user-interface](<https://devfeed.tech/tags/user-interface.md>), [xml](<https://devfeed.tech/tags/xml.md>)

## AI overview

This tutorial explains how to incorporate Android UI layouts into applications using Activities and Fragments. It covers setContentView(), onCreateView(), LayoutInflater, and findViewById() for creating and accessing interactive views.

## Source excerpt

After reading part one which discusses what Views and ViewGroups are, as well as how to create them in XML, the next step is to incorporate them into your Android application. How you use the UI you wrote depends on what it's used for. Let's break down some of the key things: