views:

37

answers:

1

How did you support both landscape and portrait for appwidget? the layout of appwidget will never change when orientate the device from landscape to portrait. by the way, would you please tell me which device support both landscape and portrait for appwidget?

A: 

The standard approach is to put the portrait version in res/layout/, and the landscape version in res/layout-land/, with the same name (e.g., appwidgetmain.xml).

Just refer to it by name (R.layout.appwidgetmain), and Android will choose the correct layout file based on the orientation

Can't answer your seconds part -- too many devices

Noah