开发者

how to access layout-large layout in the activity?

开发者 https://www.devze.com 2022-12-30 00:04 出处:网络
I am having layout which I want to render on to different sizes of mobile (like WVGA854). Resource structure is like

I am having layout which I want to render on to different sizes of mobile (like WVGA854). Resource structure is like

res\layout\main.xml res\layout-large\main.xml

By default it is taking layout main.xml file itself of layout. Its 开发者_JAVA百科not pointing to layout-large\main.xml

its throwing exception:Activity can not start resource not found

So can any one guide me how can I acheive this and how to support mutiple screens with different layouts like large,small and default along with images specified in respective dip folders.

Thanks in advance

Regards: Jayanth


its throwing exception:Activity can not start resource not found

If your files are what you say they are, you should not get this error for main.xml. You have a main.xml in the res/layout/ directory, so that will be used if nothing better is found. I suspect your error may be related to some other resource.

Here are some sample projects from one of my books that demonstrate using multiple screen sizes and densities.

0

精彩评论

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