开发者

how to set toast orientation while opened in another intent?

Hi I'm using built in android camera:

android.media.action.IMAGE_CAPTURE

and what I'm trying to achieve, is make a TOAST appear after turning the camera on.

The toast works fine, but it always shows in landscape mode. What's funny, I'm starting the toast before calling the intent with IMAGE_CAPTURE, and the toast for few moments shows in proper ori开发者_运维知识库entation, but then after turning into camera mode, it automatically flips to the landscape mode.

Because of the idea of my application, I would like it to show only in PORTRAIT mode.

Does anyone have an idea how to force toast orientation ?


I very much doubt you will be able to achieve this with the standard toast implementation. The orientation is set for the whole system by the current activity. Everything that is part of the view hierarchy will inherit the current orientation.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜