How to use Android XML Layout?

Neerajyadav

New Member
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.
 
Back
Top