Search code examples
androidandroid-resourcesr.java-file

R.layout shows only Android default template proposals.


I have a couple of xml files in my layout folder but when I use them in my class the template proposals doesn't show my layout files but shows android default proposals. There seem to be no error in any of my files at all. I tried deleting the R.java file and rebuilding and restarting eclipse but nothing seems to be working. PLease help. I need to get this done asap :(

Thanks, Sowmya.


Solution

  • First look are you setting xml name fine like

    e.g

    you have your.xml Then in onCreate

    super.onCreate(savedInstanceState);
    setContentView(R.layout.your);
    

    Then clean your project. if you have design multiple xml with same name then you must have to place them in appropriate folder using hdpi etc Further details available here