问题
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 orientation, 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 ?
回答1:
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.
来源:https://stackoverflow.com/questions/6123684/how-to-set-toast-orientation-while-opened-in-another-intent