1. Welcome to the newer, better version of Android Forums! Be sure to see the announcement and enjoy checking it out!

    Some of you have been having login issues. - Please try now. Sorry for the trouble!
  2. All attachments uploaded on the first day of this new look need to be re-uploaded, or will appear broken. All prior to that, and all going forward, should work fine. We apologize for the inconvenience!

Reference for the 'Layout'

  1. narke

    narke Member


    I am first to this. Since I see a layout id can be passed to setContentView() method of Activity object, so I guess a layout is subclass of View. But the strange thing is that I did find the class reference for the Layout in the API reference section. Could someone please point me to the right location? And, also the class R.layout looks hard to understand to me.

    Thanks in advance.

  2. Kostas G

    Kostas G Active Member

    A Layout is a subclass of ViewGroup, which is a subclass of a View. Therefore a Layout is actually a View.

    R.layout defines some standard layouts that you can use in your application. It is used with Lists and Spinners.
  3. narke

    narke Member

    Thanks for the confirmation. Can you also please how do I find the Layout class reference in the API reference documentation on the Android development web?

    Many thanks!
  4. Kostas G

    Kostas G Active Member

    There isn't a Layout class. As I wrote in the previous post, there is the ViewGroup class, which is extended by Layout implementations. You can read about the common layouts here.
  5. narke

    narke Member

    oh... Thanks!

Share This Page