开发者

Android layouts under subfolders

开发者 https://www.devze.com 2023-01-25 21:27 出处:网络
Is it possible to create subfolders under res/layout and place the layout XML files there so that one can call a view like setContentView(R.layout.ques开发者_开发技巧tions.create); or setContentView(R

Is it possible to create subfolders under res/layout and place the layout XML files there so that one can call a view like setContentView(R.layout.ques开发者_开发技巧tions.create); or setContentView(R.layout.questions/create); ?


From my tests, no.

You might want to consider a naming convention:

  • questions_create
  • questions_list
  • answers_list

Or, investigate Android library projects: http://androidblogger.blogspot.com/2010/09/android-library-projects.html - seems pretty good to add more structure.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号