开发者

how to access layout-large layout in the activity?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜