toggle menu
Airship Android SDK
androidJvm
switch theme
search in API
urbanairship-layout
/
com.urbanairship.android.layout.util
/
ResourceUtils
Resource
Utils
class
ResourceUtils
Members
Functions
dp
To
Px
Link copied to clipboard
@
Dimension
open
fun
dpToPx
(
@
NonNull
context
:
Context
,
@
Dimension
(
unit
=
0
)
dp
:
Int
)
:
Float
get
Display
Height
Pixels
Link copied to clipboard
open
fun
getDisplayHeightPixels
(
@
NonNull
context
:
Context
)
:
Int
get
Display
Width
Pixels
Link copied to clipboard
open
fun
getDisplayWidthPixels
(
@
NonNull
context
:
Context
)
:
Int
get
Orientation
Link copied to clipboard
@
Nullable
open
fun
getOrientation
(
@
NonNull
context
:
Context
)
:
Orientation
get
Window
Height
Pixels
Link copied to clipboard
open
fun
getWindowHeightPixels
(
@
NonNull
context
:
Context
,
ignoreSafeArea
:
Boolean
)
:
Int
get
Window
Size
Link copied to clipboard
@
Nullable
open
fun
getWindowSize
(
@
NonNull
context
:
Context
)
:
WindowSize
get
Window
Width
Pixels
Link copied to clipboard
open
fun
getWindowWidthPixels
(
@
NonNull
context
:
Context
,
ignoreSafeArea
:
Boolean
)
:
Int
is
Ui
Mode
Night
Link copied to clipboard
open
fun
isUiModeNight
(
@
NonNull
context
:
Context
)
:
Boolean
list
Json
Assets
Link copied to clipboard
@
NonNull
open
fun
listJsonAssets
(
@
NonNull
context
:
Context
,
@
Nullable
path
:
String
)
:
List
<
String
>
read
Asset
Link copied to clipboard
@
NonNull
open
fun
readAsset
(
@
NonNull
context
:
Context
,
@
NonNull
fileName
:
String
)
:
String
read
Json
Asset
Link copied to clipboard
@
Nullable
open
fun
readJsonAsset
(
@
NonNull
context
:
Context
,
@
NonNull
fileName
:
String
)
:
JsonMap