WatchFaceStyle.Builder
public
static
class
WatchFaceStyle.Builder
extends
Object
This class is deprecated.
Use
androidx.wear.watchface.LegacyWatchFaceOverlayStyle
from the
Jetpack Wear Watch Face
libraries instead.
Builder for WatchFaceStyle objects.
Summary
Inherited methods
|
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()
|
|
Public constructors
Builder
public Builder (
Service
service)
Parameters
|
service
|
Service
|
Public methods
build
public
WatchFaceStyle
build ()
Constructs read only WatchFaceStyle object.
setAccentColor
public
WatchFaceStyle.Builder
setAccentColor (int color)
Sets the accent color which can be set by developers to customise watch face. It will be used
when drawing the unread notification indicator. Default color is white.
This API is a no-op for devices running with Android version >=
Build.VERSION_CODES.R
setAmbientPeekMode
public
WatchFaceStyle.Builder
setAmbientPeekMode (int ambientPeekMode)
This method is deprecated.
Wear 2.0 doesn't have peeking cards
Sets how the first, peeking card will be displayed while the watch is in ambient, black &
white mode.
setBackgroundVisibility
public
WatchFaceStyle.Builder
setBackgroundVisibility (int backgroundVisibility)
This method is deprecated.
Wear 2.0 doesn't have peeking cards
Set how to display background of the first, peeking card.
setCardPeekMode
public
WatchFaceStyle.Builder
setCardPeekMode (int peekMode)
This method is deprecated.
Wear 2.0 doesn't have peeking cards
Sets how far into the screen the first card will peek while the watch face is displayed.
Parameters
|
peekMode
|
int
: must be either PEEK_MODE_VARIABLE or PEEK_MODE_SHORT
|
setHideNotificationIndicator
public
WatchFaceStyle.Builder
setHideNotificationIndicator (boolean hide)
Sets whether to hide the dot indicator that is displayed at the bottom of the watch face if
there are any unread notifications. The default value is false, but note that the dot will
not be displayed if the numerical unread count indicator is being shown (i.e. if
WatchFaceStyle.getShowUnreadCountIndicator()
is true).
This API is a no-op for devices running with Android version >=
Build.VERSION_CODES.R
setHotwordIndicatorGravity
public
WatchFaceStyle.Builder
setHotwordIndicatorGravity (int hotwordIndicatorGravity)
This method is deprecated.
Wear 2.0 doesn't show hotword indication on the watch face
Sets position of hotword (OK Google) on the screen.
setPeekOpacityMode
public
WatchFaceStyle.Builder
setPeekOpacityMode (int peekOpacityMode)
This method is deprecated.
Wear 2.0 doesn't have peeking cards
Sets whether the first, peeking card should be opaque when the watch face is displayed.
setShowSystemUiTime
public
WatchFaceStyle.Builder
setShowSystemUiTime (boolean showSystemUiTime)
This method is deprecated.
this will be removed in a future version of the Wear platform
Sets if the system will draw the system-style time over the watch face.
Parameters
|
showSystemUiTime
|
boolean
: Set this to false if you already draw or clearly represent the time
on your watch face.
|
setShowUnreadCountIndicator
public
WatchFaceStyle.Builder
setShowUnreadCountIndicator (boolean show)
Sets whether to add an indicator of how many unread cards there are in the stream. The
indicator will be displayed next to status icons (battery state, lack of connection).
This API is a no-op for devices running with Android version >=
Build.VERSION_CODES.R
Parameters
|
show
|
boolean
: if true an indicator will be shown
|
setStatusBarGravity
public
WatchFaceStyle.Builder
setStatusBarGravity (int statusBarGravity)
Sets position of status icons (battery state, lack of connection) on the screen.
This API is a no-op for devices running with Android version >=
Build.VERSION_CODES.R
setViewProtection
public
WatchFaceStyle.Builder
setViewProtection (int viewProtection)
This method is deprecated.
Use
setViewProtectionMode(int)
instead.
Adds background color to UI elements of the home screen, so they are readable on the watch
face. This should be used if the watch face color is close to being white.
setViewProtectionMode
public
WatchFaceStyle.Builder
setViewProtectionMode (int viewProtectionMode)
Adds background color to UI elements of the home screen, so they are readable on the watch
face. This should be used if the watch face color is close to being white.
This API will only consider
WatchFaceStyle.PROTECT_WHOLE_SCREEN
for devices running with Android
version >=
Build.VERSION_CODES.R