Android orientation mode

redbird's home
둘러보기로 이동 검색으로 이동

android orientation mode

import android.content.res.Configuration

val orientation = resources.configuration.orientation
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
    // In landscape mode
} else {
    // In portrait mode or other orientation
}