Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8016209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:28:41+00:00 2026-06-04T20:28:41+00:00

The purpose of the XML layout is confusing for me, having only worked with

  • 0

The purpose of the XML layout is confusing for me, having only worked with UI in Visual Studio with the drag-drop xml layout and C# code-behind. Should I be creating a separate xml layout for every screen (load, main, data) in my application? How do views associate with layouts? How do I reference the xml and use it in my code? I only know of the setContentView(xml layout) call.

For example, for my loading screen I want to display a background image and a loading bar. I’m thinking there’s a way for the layout to contain the picture and the widget so the user sees the loading screen immediately, and in the actual code I’m initializing all my necessary variables.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:28:42+00:00Added an answer on June 4, 2026 at 8:28 pm

    If you are confused on how layout works in Android, better try reading this topic on XML Layouts and also read this tutorial about user interface in Android for a head start.

    Here’s also a tutorial on how to set background image to progress bar.

    You should load the layout resource(main.xml) from your application code, in onCreate method of your Activity.

    setContentView(R.layout.main);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm planning to use XML for database purpose. Only thing I was able to
Purpose: I plan to Create a XML file with XmlTextWriter and Modify/Update some Existing
What is the purpose of the PropertySpecified pattern used by XML Serialization ? What
The purpose of this code is to pull upgrade.zip from a central server, extract
I have sample code written for parsing xml file using javax.xml package. it uses
My purpose is to obtain something like that : But the only examples i
I just had to produce a long xml sequence for some testing purpose, a
I am designing custom dialogue in android, For this purpose I designed xml file
What's the purpose of the .xml documentation files shipped with the assemblies ( .dll
Purpose of this web service is to server html/javascript/css/binary data inside simple XML document

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.