Stay organized with collections
Save and categorize content based on your preferences.
SurfaceColors
public
final
enum
SurfaceColors
extends Enum<
SurfaceColors
>
Provides a convenient way to get color values of tonal variations of
R.attr.colorSurface
.
Summary
Enum values
|
SurfaceColors
|
SURFACE_0
|
SurfaceColors
|
SURFACE_1
|
SurfaceColors
|
SURFACE_2
|
SurfaceColors
|
SURFACE_3
|
SurfaceColors
|
SURFACE_4
|
SurfaceColors
|
SURFACE_5
|
Inherited methods
|
From class
java.lang.Enum
final
Object
|
clone()
|
final
int
|
compareTo(E arg0)
|
int
|
compareTo(Object arg0)
|
final
boolean
|
equals(Object arg0)
|
final
void
|
finalize()
|
final
Class<E>
|
getDeclaringClass()
|
final
int
|
hashCode()
|
final
String
|
name()
|
final
int
|
ordinal()
|
String
|
toString()
|
static
<T extends Enum<T>>
T
|
valueOf(Class<T> arg0, String arg1)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
java.lang.Comparable
abstract
int
|
compareTo(E arg0)
|
|
Enum values
Public methods
getColor
public int getColor (Context context)
Returns the tonal surface color value in RGB.
Parameters
|
context
|
Context
|
getColorForElevation
public static int getColorForElevation (Context context,
float elevation)
Returns the corresponding surface color in RGB with the given elevation.
Parameters
|
context
|
Context
|
elevation
|
float
|
Content and code samples on this page are subject to the licenses described in the
Content License
. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-01-19 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]