Cocos2d-x のスケルトンでは横画面アプリが生成されますが、これを縦画面に変更します。
また、個人的な好みにより、アプリにAndroidのステータスバーを表示させ、時計が見えるようにします。
変更方法はAndroidManifest.xmlを編集するだけです。
1<activity
2 android:name="org.cocos2dx.cpp.AppActivity"
3 android:label="@string/app_name"
4 android:screenOrientation="landscape"
5 android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
6 android:configChanges="orientation">
画面の向きを指定する
画面の向きを変えるにはscreenOrientation
を変更します。
- 縦画面~portrait
- 横画面~landscape
参考
http://developer.android.com/intl/ja/guide/topics/manifest/activity-element.html
時計を表示する
OS側の制御は theme
で定義します。
Fullscreen
をカットするとOSのステータスバーが表示されます。
個人的な好みと書きましたが、アプリを使っていても「バッテリーを確認したい」「時刻を確認したい」というニーズは開発者が思っている以上にあるんですよね。特に理由がなければ、時計を表示させてあげるのが親切ではないかと思います。
参考
http://developer.android.com/intl/ja/guide/topics/ui/themes.html