Domanda

È possibile impostare l'orientamento di un'attività (nel manifest o con setRequestedorrientation) e specificare quale paesaggio o modalità di ritratto utilizzare? Cioè posso scegliere il lato sinistro o destro del dispositivo?

Con 2.1 non sembra possibile, ma mi chiedevo se qualcuno avesse delle soluzioni alternative?

E dove è usato questo?

È stato utile?

Soluzione

Quando si definisce la tua attività nel manifest si specifica l'orientamento.

<activity
    android:screenOrientation="landscape" />

Lo mostrerà solo nel paesaggio.

Altri suggerimenti

You could try setRequestedOrientation(8).

The attribute itself is from API 1, and the constant for reverseLandscape is from level 9. Without the constant it might still work? Idk, thought it might be worth a try.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top