그러나 가끔 가로형 또는 세로형중 한가지로 고정시켜서 프로그램을 해야 할 때가 있죠.
안드로이드 프로그램일 경우 다음과 같이 Attribute를 수정하면 됩니다.
using Android.Graphics;
using Android.Content.PM;
using System.Collections.Generic;
namespace TouchTest.Droid
{
[Activity (Label = "TouchTest.Droid", MainLauncher = true, Icon = "@drawable/icon",
ScreenOrientation = ScreenOrientation.SensorLandscape)]
public class MainActivity : Activity
{
만약 이 부분을 ScreenOrientation.Landscape로 한다면, 스마트폰을 뒤집었을때 다음과 같이 그려집니다.
그러나 ScreenOrientation.SensorLandscape로 한다면 다음과 같이 나오죠


댓글 없음:
댓글 쓰기