How can I check if the Android phone is in Landscape or Portrait?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
In Activity file :
AND in Manifest file:
I hope it'll help you ..!
The current configuration, as used to determine which resources to retrieve, is available from the Resources'
Configuration
object:You can check for orientation by looking at its value:
More information can be found in the Android Developer docs.
Check screen orientation in runtime.
Use this way,
in the String you have the Oriantion
I think this solution easy one