RemoteViewsCompat
public static class RemoteViewsCompat
Helper for accessing features in RemoteViews.
Summary
Nested types |
|---|
public final class RemoteViewsCompat.RemoteCollectionItemsRepresentation of a fixed list of items to be displayed in a RemoteViews collection. |
public final class RemoteViewsCompat.RemoteCollectionItems.BuilderBuilder class for |
Public fields |
|
|---|---|
static @NonNull RemoteViewsCompat |
Public fields
Public methods
setChronometerBase
public static final void setChronometerBase(
@NonNull RemoteViews receiver,
@IdRes int viewId,
long base
)
Equivalent to calling android.widget.Chronometer.setBase.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
long base |
The time at which the timer would have read 0:00. This time should be based off of |
setChronometerFormat
public static final void setChronometerFormat(
@NonNull RemoteViews receiver,
@IdRes int viewId,
String format
)
Equivalent to calling android.widget.Chronometer.setFormat.
setCompoundButtonDrawable
@RequiresApi(value = 31)
public static final void setCompoundButtonDrawable(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DrawableRes int resId
)
Equivalent to calling android.widget.CompoundButton.setButtonDrawable.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@DrawableRes int resId |
The resource identifier of the drawable, or 0 to clear the button. |
setCompoundButtonIcon
@RequiresApi(value = 31)
public static final void setCompoundButtonIcon(
@NonNull RemoteViews receiver,
@IdRes int viewId,
Icon icon
)
Equivalent to calling android.widget.CompoundButton.setButtonIcon.
setCompoundButtonTintBlendMode
@RequiresApi(value = 31)
public static final void setCompoundButtonTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode tintMode
)
Equivalent to calling android.widget.CompoundButton.setButtonTintBlendMode.
setCompoundButtonTintList
@RequiresApi(value = 31)
public static final void setCompoundButtonTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.CompoundButton.setButtonTintList.
setCompoundButtonTintList
@RequiresApi(value = 31)
public static final void setCompoundButtonTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.widget.CompoundButton.setButtonTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint. |
setCompoundButtonTintList
@RequiresApi(value = 31)
public static final void setCompoundButtonTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNight,
ColorStateList night
)
Equivalent to calling android.widget.CompoundButton.setButtonTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNight |
The tint to apply when the UI is not in night mode, may be null to clear tint. |
ColorStateList night |
The tint to apply when the UI is in night mode, may be null to clear tint. |
setCompoundButtonTintListAttr
@RequiresApi(value = 31)
public static final void setCompoundButtonTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.CompoundButton.setButtonTintList.
setFrameLayoutForegroundGravity
public static final void setFrameLayoutForegroundGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int foregroundGravity
)
Equivalent to calling android.widget.FrameLayout.setForegroundGravity.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int foregroundGravity |
See |
setFrameLayoutMeasureAllChildren
public static final void setFrameLayoutMeasureAllChildren(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean measureAll
)
Equivalent to calling android.widget.FrameLayout.setMeasureAllChildren.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean measureAll |
True to consider children marked GONE, false otherwise. |
setGridLayoutAlignmentMode
@RequiresApi(value = 31)
public static final void setGridLayoutAlignmentMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int alignmentMode
)
Equivalent to calling android.widget.GridLayout.setAlignmentMode.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int alignmentMode |
Either |
setGridLayoutColumnCount
@RequiresApi(value = 31)
public static final void setGridLayoutColumnCount(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int columnCount
)
Equivalent to calling android.widget.GridLayout.setColumnCount.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int columnCount |
The number of columns. |
setGridLayoutRowCount
@RequiresApi(value = 31)
public static final void setGridLayoutRowCount(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int rowCount
)
Equivalent to calling android.widget.GridLayout.setRowCount.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int rowCount |
The number of rows. |
setGridViewColumnWidth
@RequiresApi(value = 31)
public static final void setGridViewColumnWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.GridView.setColumnWidth.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The column width. |
int unit |
The unit for |
setGridViewColumnWidthDimen
@RequiresApi(value = 31)
public static final void setGridViewColumnWidthDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int columnWidth
)
Equivalent to calling android.widget.GridView.setColumnWidth.
setGridViewColumnWidthDimenAttr
@RequiresApi(value = 31)
public static final void setGridViewColumnWidthDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int columnWidth
)
Equivalent to calling android.widget.GridView.setColumnWidth.
setGridViewGravity
@RequiresApi(value = 31)
public static final void setGridViewGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int gravity
)
Equivalent to calling android.widget.GridView.setGravity.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int gravity |
The gravity to apply to this grid's children. |
setGridViewHorizontalSpacing
@RequiresApi(value = 31)
public static final void setGridViewHorizontalSpacing(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.GridView.setHorizontalSpacing.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The amount of horizontal space between items. |
int unit |
The unit for |
setGridViewHorizontalSpacingDimen
@RequiresApi(value = 31)
public static final void setGridViewHorizontalSpacingDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.GridView.setHorizontalSpacing.
setGridViewHorizontalSpacingDimenAttr
@RequiresApi(value = 31)
public static final void setGridViewHorizontalSpacingDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.GridView.setHorizontalSpacing.
setGridViewNumColumns
@RequiresApi(value = 31)
public static final void setGridViewNumColumns(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int numColumns
)
Equivalent to calling android.widget.GridView.setNumColumns.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int numColumns |
The desired number of columns. |
setGridViewStretchMode
@RequiresApi(value = 31)
public static final void setGridViewStretchMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int stretchMode
)
Equivalent to calling android.widget.GridView.setStretchMode.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int stretchMode |
Either |
setGridViewVerticalSpacing
@RequiresApi(value = 31)
public static final void setGridViewVerticalSpacing(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.GridView.setVerticalSpacing.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The amount of vertical space between items. |
int unit |
The unit for |
setGridViewVerticalSpacingDimen
@RequiresApi(value = 31)
public static final void setGridViewVerticalSpacingDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.GridView.setVerticalSpacing.
setGridViewVerticalSpacingDimenAttr
@RequiresApi(value = 31)
public static final void setGridViewVerticalSpacingDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.GridView.setVerticalSpacing.
setImageViewAdjustViewBounds
public static final void setImageViewAdjustViewBounds(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean adjustViewBounds
)
Equivalent to calling android.widget.ImageView.setAdjustViewBounds.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean adjustViewBounds |
Whether to adjust the bounds of this view to preserve the original aspect ratio of the drawable. |
setImageViewColorFilter
public static final void setImageViewColorFilter(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int color
)
Equivalent to calling android.widget.ImageView.setColorFilter.
setImageViewColorFilter
@RequiresApi(value = 31)
public static final void setImageViewColorFilter(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int notNight,
@ColorInt int night
)
Equivalent to calling android.widget.ImageView.setColorFilter.
setImageViewColorFilterAttr
@RequiresApi(value = 31)
public static final void setImageViewColorFilterAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.ImageView.setColorFilter.
setImageViewColorFilterResource
@RequiresApi(value = 31)
public static final void setImageViewColorFilterResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.ImageView.setColorFilter.
setImageViewImageAlpha
public static final void setImageViewImageAlpha(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int alpha
)
Equivalent to calling android.widget.ImageView.setImageAlpha.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int alpha |
The alpha value that should be applied to the image (between 0 and 255 inclusive, with 0 being transparent and 255 being opaque) |
setImageViewImageLevel
public static final void setImageViewImageLevel(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int level
)
Equivalent to calling android.widget.ImageView.setImageLevel.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int level |
The new level for the image. |
setImageViewImageTintBlendMode
@RequiresApi(value = 31)
public static final void setImageViewImageTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode blendMode
)
Equivalent to calling android.widget.ImageView.setImageTintBlendMode.
setImageViewImageTintList
@RequiresApi(value = 31)
public static final void setImageViewImageTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.ImageView.setImageTintList.
setImageViewImageTintList
@RequiresApi(value = 31)
public static final void setImageViewImageTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.widget.ImageView.setImageTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint |
setImageViewImageTintList
@RequiresApi(value = 31)
public static final void setImageViewImageTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNightTint,
ColorStateList nightTint
)
Equivalent to calling android.widget.ImageView.setImageTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNightTint |
The tint to apply when the UI is not in night mode, may be null to clear tint. |
ColorStateList nightTint |
The tint to apply when the UI is in night mode, may be null to clear tint. |
setImageViewImageTintListAttr
@RequiresApi(value = 31)
public static final void setImageViewImageTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.ImageView.setImageTintList.
setImageViewMaxHeight
public static final void setImageViewMaxHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int maxHeight
)
Equivalent to calling android.widget.ImageView.setMaxHeight.
setImageViewMaxHeight
@RequiresApi(value = 31)
public static final void setImageViewMaxHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.ImageView.setMaxHeight.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The maximum height of the view. |
int unit |
The unit for |
setImageViewMaxHeightDimen
@RequiresApi(value = 31)
public static final void setImageViewMaxHeightDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.ImageView.setMaxHeight.
setImageViewMaxHeightDimenAttr
@RequiresApi(value = 31)
public static final void setImageViewMaxHeightDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.ImageView.setMaxHeight.
setImageViewMaxWidth
public static final void setImageViewMaxWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int maxWidth
)
Equivalent to calling android.widget.ImageView.setMaxWidth.
setImageViewMaxWidth
@RequiresApi(value = 31)
public static final void setImageViewMaxWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.ImageView.setMaxWidth.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The maximum width of the view. |
int unit |
The unit for |
setImageViewMaxWidthDimen
@RequiresApi(value = 31)
public static final void setImageViewMaxWidthDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.ImageView.setMaxWidth.
setImageViewMaxWidthDimenAttr
@RequiresApi(value = 31)
public static final void setImageViewMaxWidthDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.ImageView.setMaxWidth.
setLinearLayoutBaselineAligned
public static final void setLinearLayoutBaselineAligned(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean baselineAligned
)
Equivalent to calling android.widget.LinearLayout.setBaselineAligned.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean baselineAligned |
True to align widgets on their baseline, false otherwise. |
setLinearLayoutBaselineAlignedChildIndex
public static final void setLinearLayoutBaselineAlignedChildIndex(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int i
)
Equivalent to calling android.widget.LinearLayout.setBaselineAlignedChildIndex.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int i |
True to align widgets on their baseline, false otherwise. |
setLinearLayoutGravity
public static final void setLinearLayoutGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int gravity
)
Equivalent to calling android.widget.LinearLayout.setGravity.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int gravity |
See |
setLinearLayoutHorizontalGravity
public static final void setLinearLayoutHorizontalGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int horizontalGravity
)
Equivalent to calling android.widget.LinearLayout.setHorizontalGravity.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
setLinearLayoutMeasureWithLargestChildEnabled
public static final void setLinearLayoutMeasureWithLargestChildEnabled(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean enabled
)
Equivalent to calling android.widget.LinearLayout.setMeasureWithLargestChildEnabled.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean enabled |
True to measure children with a weight using the minimum size of the largest child, false otherwise. |
setLinearLayoutVerticalGravity
public static final void setLinearLayoutVerticalGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int verticalGravity
)
Equivalent to calling android.widget.LinearLayout.setVerticalGravity.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
setLinearLayoutWeightSum
public static final void setLinearLayoutWeightSum(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float weightSum
)
Equivalent to calling android.widget.LinearLayout.setWeightSum.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float weightSum |
A number greater than 0.0f, or a number lower than or equals to 0.0f if the weight sum should be computed from the children's layout_weight |
setProgressBarIndeterminate
public static final void setProgressBarIndeterminate(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean indeterminate
)
Equivalent to calling android.widget.ProgressBar.setIndeterminate.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean indeterminate |
True to enable the indeterminate mode. |
setProgressBarIndeterminateTintBlendMode
@RequiresApi(value = 31)
public static final void setProgressBarIndeterminateTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode blendMode
)
Equivalent to calling android.widget.ProgressBar.setIndeterminateTintBlendMode.
setProgressBarIndeterminateTintList
@RequiresApi(value = 31)
public static final void setProgressBarIndeterminateTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.ProgressBar.setIndeterminateTintList.
setProgressBarIndeterminateTintList
@RequiresApi(value = 31)
public static final void setProgressBarIndeterminateTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.widget.ProgressBar.setIndeterminateTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint. |
setProgressBarIndeterminateTintList
@RequiresApi(value = 31)
public static final void setProgressBarIndeterminateTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNightTint,
ColorStateList nightTint
)
Equivalent to calling android.widget.ProgressBar.setIndeterminateTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNightTint |
The tint to apply when the UI is not in night mode, may be null to clear tint. |
ColorStateList nightTint |
The tint to apply when the UI is in night mode, may be null to clear tint. |
setProgressBarIndeterminateTintListAttr
@RequiresApi(value = 31)
public static final void setProgressBarIndeterminateTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.ProgressBar.setIndeterminateTintList.
setProgressBarMax
public static final void setProgressBarMax(@NonNull RemoteViews receiver, @IdRes int viewId, int max)
Equivalent to calling android.widget.ProgressBar.setMax.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int max |
The upper range of this progress bar. |
setProgressBarMin
@RequiresApi(value = 26)
public static final void setProgressBarMin(@NonNull RemoteViews receiver, @IdRes int viewId, int min)
Equivalent to calling android.widget.ProgressBar.setMin.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int min |
The lower range of this progress bar. |
setProgressBarProgress
public static final void setProgressBarProgress(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int progress
)
Equivalent to calling android.widget.ProgressBar.setProgress.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int progress |
The new progress. |
setProgressBarProgressBackgroundTintBlendMode
@RequiresApi(value = 31)
public static final void setProgressBarProgressBackgroundTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode blendMode
)
Equivalent to calling android.widget.ProgressBar.setProgressBackgroundTintBlendMode.
setProgressBarProgressBackgroundTintList
@RequiresApi(value = 31)
public static final void setProgressBarProgressBackgroundTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.ProgressBar.setProgressBackgroundTintList.
setProgressBarProgressBackgroundTintList
@RequiresApi(value = 31)
public static final void setProgressBarProgressBackgroundTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.widget.ProgressBar.setProgressBackgroundTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint. |
setProgressBarProgressBackgroundTintList
@RequiresApi(value = 31)
public static final void setProgressBarProgressBackgroundTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNightTint,
ColorStateList nightTint
)
Equivalent to calling android.widget.ProgressBar.setProgressBackgroundTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNightTint |
The tint to apply when the UI is not in night mode, may be null to clear tint. |
ColorStateList nightTint |
The tint to apply when the UI is in night mode, may be null to clear tint. |
setProgressBarProgressBackgroundTintListAttr
@RequiresApi(value = 31)
public static final void setProgressBarProgressBackgroundTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.ProgressBar.setProgressBackgroundTintList.
setProgressBarProgressTintBlendMode
@RequiresApi(value = 31)
public static final void setProgressBarProgressTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode blendMode
)
Equivalent to calling android.widget.ProgressBar.setProgressTintBlendMode.
setProgressBarProgressTintList
@RequiresApi(value = 31)
public static final void setProgressBarProgressTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.ProgressBar.setProgressTintList.
setProgressBarProgressTintList
@RequiresApi(value = 31)
public static final void setProgressBarProgressTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.widget.ProgressBar.setProgressTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint. |
setProgressBarProgressTintList
@RequiresApi(value = 31)
public static final void setProgressBarProgressTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNightTint,
ColorStateList nightTint
)
Equivalent to calling android.widget.ProgressBar.setProgressTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNightTint |
The tint to apply when the UI is not in night mode, may be null to clear tint. |
ColorStateList nightTint |
The tint to apply when the UI is in night mode, may be null to clear tint. |
setProgressBarProgressTintListAttr
@RequiresApi(value = 31)
public static final void setProgressBarProgressTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.ProgressBar.setProgressTintList.
setProgressBarSecondaryProgress
public static final void setProgressBarSecondaryProgress(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int secondaryProgress
)
Equivalent to calling android.widget.ProgressBar.setSecondaryProgress.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int secondaryProgress |
The new secondary progress. |
setProgressBarSecondaryProgressTintBlendMode
@RequiresApi(value = 31)
public static final void setProgressBarSecondaryProgressTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode blendMode
)
Equivalent to calling android.widget.ProgressBar.setSecondaryProgressTintBlendMode.
setProgressBarSecondaryProgressTintList
@RequiresApi(value = 31)
public static final void setProgressBarSecondaryProgressTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.ProgressBar.setSecondaryProgressTintList.
setProgressBarSecondaryProgressTintList
@RequiresApi(value = 31)
public static final void setProgressBarSecondaryProgressTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.widget.ProgressBar.setSecondaryProgressTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint. |
setProgressBarSecondaryProgressTintList
@RequiresApi(value = 31)
public static final void setProgressBarSecondaryProgressTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNightTint,
ColorStateList nightTint
)
Equivalent to calling android.widget.ProgressBar.setSecondaryProgressTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNightTint |
The tint to apply when the UI is not in night mode, may be null to clear tint. |
ColorStateList nightTint |
The tint to apply when the UI is in night mode, may be null to clear tint. |
setProgressBarSecondaryProgressTintListAttr
@RequiresApi(value = 31)
public static final void setProgressBarSecondaryProgressTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.ProgressBar.setSecondaryProgressTintList.
setProgressBarStateDescription
@RequiresApi(value = 31)
public static final void setProgressBarStateDescription(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.widget.ProgressBar.setStateDescription.
setProgressBarStateDescription
@RequiresApi(value = 31)
public static final void setProgressBarStateDescription(
@NonNull RemoteViews receiver,
@IdRes int viewId,
CharSequence stateDescription
)
Equivalent to calling android.widget.ProgressBar.setStateDescription.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
CharSequence stateDescription |
The state description, or null to reset to the default ProgressBar state description. |
setProgressBarStateDescriptionAttr
@RequiresApi(value = 31)
public static final void setProgressBarStateDescriptionAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.ProgressBar.setStateDescription.
setRelativeLayoutGravity
public static final void setRelativeLayoutGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int gravity
)
Equivalent to calling android.widget.RelativeLayout.setGravity.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int gravity |
See |
setRelativeLayoutHorizontalGravity
public static final void setRelativeLayoutHorizontalGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int horizontalGravity
)
Equivalent to calling android.widget.RelativeLayout.setHorizontalGravity.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
setRelativeLayoutIgnoreGravity
public static final void setRelativeLayoutIgnoreGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@IdRes int childViewId
)
Equivalent to calling android.widget.RelativeLayout.setIgnoreGravity.
setRelativeLayoutVerticalGravity
public static final void setRelativeLayoutVerticalGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int verticalGravity
)
Equivalent to calling android.widget.RelativeLayout.setVerticalGravity.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
setRemoteAdapter
public static final void setRemoteAdapter(
@NonNull Context context,
@NonNull RemoteViews remoteViews,
int appWidgetId,
@IdRes int viewId,
@NonNull RemoteViewsCompat.RemoteCollectionItems items
)
Creates a simple Adapter for the widgetId and viewId specified. The viewId must point to an AdapterView, ie. android.widget.ListView, android.widget.GridView, android.widget.StackView, or android.widget.AdapterViewAnimator.
This is a simpler but less flexible approach to populating collection widgets. Its use is encouraged for most scenarios, as long as the total memory within the list of RemoteViews is relatively small (ie. doesn't contain large or numerous Bitmaps, see RemoteViews.setImageViewBitmap). In the case of numerous images, the use of API is still possible by setting image URIs instead of Bitmaps, see RemoteViews.setImageViewUri.
If you use this API, you should not call AppWidgetManager.notifyAppWidgetViewDataChanged and should instead update your app widget, calling this method with the new RemoteCollectionItems.
| Parameters | |
|---|---|
@NonNull Context context |
The |
@NonNull RemoteViews remoteViews |
The |
int appWidgetId |
the id of the widget for which the adapter is being set. |
@IdRes int viewId |
The id of the |
@NonNull RemoteViewsCompat.RemoteCollectionItems items |
The items to display in the |
setSwitchMinWidth
@RequiresApi(value = 31)
public static final void setSwitchMinWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.Switch.setSwitchMinWidth.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
Minimum width of the switch. |
int unit |
The unit for |
setSwitchMinWidthDimen
@RequiresApi(value = 31)
public static final void setSwitchMinWidthDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.Switch.setSwitchMinWidth.
setSwitchMinWidthDimenAttr
@RequiresApi(value = 31)
public static final void setSwitchMinWidthDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.Switch.setSwitchMinWidth.
setSwitchPadding
@RequiresApi(value = 31)
public static final void setSwitchPadding(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.Switch.setSwitchPadding.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
Amount of padding. |
int unit |
The unit for |
setSwitchPaddingDimen
@RequiresApi(value = 31)
public static final void setSwitchPaddingDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.Switch.setSwitchPadding.
setSwitchPaddingDimenAttr
@RequiresApi(value = 31)
public static final void setSwitchPaddingDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.Switch.setSwitchPadding.
setSwitchShowText
@RequiresApi(value = 31)
public static final void setSwitchShowText(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean showText
)
Equivalent to calling android.widget.Switch.setShowText.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean showText |
True to display on/off text. |
setSwitchSplitTrack
@RequiresApi(value = 31)
public static final void setSwitchSplitTrack(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean splitTrack
)
Equivalent to calling android.widget.Switch.setSplitTrack.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean splitTrack |
Whether the track should be split by the thumb. |
setSwitchTextOff
@RequiresApi(value = 31)
public static final void setSwitchTextOff(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.widget.Switch.setTextOff.
setSwitchTextOff
@RequiresApi(value = 31)
public static final void setSwitchTextOff(
@NonNull RemoteViews receiver,
@IdRes int viewId,
CharSequence textOff
)
Equivalent to calling android.widget.Switch.setTextOff.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
CharSequence textOff |
The text displayed when the button is not in the checked state. |
setSwitchTextOffAttr
@RequiresApi(value = 31)
public static final void setSwitchTextOffAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.Switch.setTextOff.
setSwitchTextOn
@RequiresApi(value = 31)
public static final void setSwitchTextOn(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.widget.Switch.setTextOn.
setSwitchTextOn
@RequiresApi(value = 31)
public static final void setSwitchTextOn(
@NonNull RemoteViews receiver,
@IdRes int viewId,
CharSequence textOn
)
Equivalent to calling android.widget.Switch.setTextOn.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
CharSequence textOn |
The text displayed when the button is in the checked state. |
setSwitchTextOnAttr
@RequiresApi(value = 31)
public static final void setSwitchTextOnAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.Switch.setTextOn.
setSwitchThumbIcon
@RequiresApi(value = 31)
public static final void setSwitchThumbIcon(
@NonNull RemoteViews receiver,
@IdRes int viewId,
Icon icon
)
Equivalent to calling android.widget.Switch.setThumbIcon.
setSwitchThumbIcon
@RequiresApi(value = 31)
public static final void setSwitchThumbIcon(
@NonNull RemoteViews receiver,
@IdRes int viewId,
Icon notNight,
Icon night
)
Equivalent to calling android.widget.Switch.setThumbIcon.
setSwitchThumbResource
@RequiresApi(value = 31)
public static final void setSwitchThumbResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DrawableRes int resId
)
Equivalent to calling android.widget.Switch.setThumbResource.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@DrawableRes int resId |
Resource id of a thumb drawable. |
setSwitchThumbTextPadding
@RequiresApi(value = 31)
public static final void setSwitchThumbTextPadding(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.Switch.setThumbTextPadding.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
Horizontal padding for switch thumb text. |
int unit |
The unit for |
setSwitchThumbTextPaddingDimen
@RequiresApi(value = 31)
public static final void setSwitchThumbTextPaddingDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.Switch.setThumbTextPadding.
setSwitchThumbTextPaddingDimenAttr
@RequiresApi(value = 31)
public static final void setSwitchThumbTextPaddingDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.Switch.setThumbTextPadding.
setSwitchThumbTintBlendMode
@RequiresApi(value = 31)
public static final void setSwitchThumbTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode blendMode
)
Equivalent to calling android.widget.Switch.setThumbTintBlendMode.
setSwitchThumbTintList
@RequiresApi(value = 31)
public static final void setSwitchThumbTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.Switch.setThumbTintList.
setSwitchThumbTintList
@RequiresApi(value = 31)
public static final void setSwitchThumbTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.widget.Switch.setThumbTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint. |
setSwitchThumbTintList
@RequiresApi(value = 31)
public static final void setSwitchThumbTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNight,
ColorStateList night
)
Equivalent to calling android.widget.Switch.setThumbTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNight |
The tint to apply when the UI is not in night mode, may be null to clear tint. |
ColorStateList night |
The tint to apply when the UI is in night mode, may be null to clear tint. |
setSwitchThumbTintListAttr
@RequiresApi(value = 31)
public static final void setSwitchThumbTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.Switch.setThumbTintList.
setSwitchTrackIcon
@RequiresApi(value = 31)
public static final void setSwitchTrackIcon(
@NonNull RemoteViews receiver,
@IdRes int viewId,
Icon icon
)
Equivalent to calling android.widget.Switch.setTrackIcon.
setSwitchTrackIcon
@RequiresApi(value = 31)
public static final void setSwitchTrackIcon(
@NonNull RemoteViews receiver,
@IdRes int viewId,
Icon notNight,
Icon night
)
Equivalent to calling android.widget.Switch.setTrackIcon.
setSwitchTrackResource
@RequiresApi(value = 31)
public static final void setSwitchTrackResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DrawableRes int resId
)
Equivalent to calling android.widget.Switch.setTrackResource.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@DrawableRes int resId |
Resource id of a track drawable. |
setSwitchTrackTintBlendMode
@RequiresApi(value = 31)
public static final void setSwitchTrackTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode blendMode
)
Equivalent to calling android.widget.Switch.setTrackTintBlendMode.
setSwitchTrackTintList
@RequiresApi(value = 31)
public static final void setSwitchTrackTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.Switch.setTrackTintList.
setSwitchTrackTintList
@RequiresApi(value = 31)
public static final void setSwitchTrackTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.widget.Switch.setTrackTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint. |
setSwitchTrackTintList
@RequiresApi(value = 31)
public static final void setSwitchTrackTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNight,
ColorStateList night
)
Equivalent to calling android.widget.Switch.setTrackTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNight |
The tint to apply when the UI is not in night mode, may be null to clear tint. |
ColorStateList night |
The tint to apply when the UI is in night mode, may be null to clear tint. |
setSwitchTrackTintListAttr
@RequiresApi(value = 31)
public static final void setSwitchTrackTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.Switch.setTrackTintList.
setTextClockFormat12Hour
public static final void setTextClockFormat12Hour(
@NonNull RemoteViews receiver,
@IdRes int viewId,
CharSequence format
)
Equivalent to calling android.widget.TextClock.setFormat12Hour.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
CharSequence format |
A date/time formatting pattern as described in |
setTextClockFormat12Hour
@RequiresApi(value = 31)
public static final void setTextClockFormat12Hour(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.widget.TextClock.setFormat12Hour.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@StringRes int resId |
A resource id for a date/time formatting pattern as described in |
setTextClockFormat12HourAttr
@RequiresApi(value = 31)
public static final void setTextClockFormat12HourAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextClock.setFormat12Hour.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@AttrRes int resId |
An attribute id for a date/time formatting pattern as described in |
setTextClockFormat24Hour
public static final void setTextClockFormat24Hour(
@NonNull RemoteViews receiver,
@IdRes int viewId,
CharSequence format
)
Equivalent to calling android.widget.TextClock.setFormat24Hour.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
CharSequence format |
A date/time formatting pattern as described in |
setTextClockFormat24Hour
@RequiresApi(value = 31)
public static final void setTextClockFormat24Hour(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.widget.TextClock.setFormat24Hour.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@StringRes int resId |
A resource id for a date/time formatting pattern as described in |
setTextClockFormat24HourAttr
@RequiresApi(value = 31)
public static final void setTextClockFormat24HourAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextClock.setFormat24Hour.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@AttrRes int resId |
An attribute id for a date/time formatting pattern as described in |
setTextClockTimeZone
public static final void setTextClockTimeZone(
@NonNull RemoteViews receiver,
@IdRes int viewId,
String timeZone
)
Equivalent to calling android.widget.TextClock.setTimeZone.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
String timeZone |
The desired time zone's ID as specified in |
setTextViewAllCaps
@RequiresApi(value = 31)
public static final void setTextViewAllCaps(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean allCaps
)
Equivalent to calling android.widget.TextView.setAllCaps.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean allCaps |
Whether the text should display in all caps. |
setTextViewAutoLinkMask
public static final void setTextViewAutoLinkMask(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int mask
)
Equivalent to calling android.widget.TextView.setAutoLinkMask.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int mask |
See |
setTextViewCompoundDrawablePadding
public static final void setTextViewCompoundDrawablePadding(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int pad
)
Equivalent to calling android.widget.TextView.setCompoundDrawablePadding.
setTextViewCompoundDrawablePadding
@RequiresApi(value = 31)
public static final void setTextViewCompoundDrawablePadding(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setCompoundDrawablePadding.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The padding between the compound drawables and the text. |
int unit |
The unit for |
setTextViewCompoundDrawablePaddingDimen
@RequiresApi(value = 31)
public static final void setTextViewCompoundDrawablePaddingDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.TextView.setCompoundDrawablePadding.
setTextViewCompoundDrawablePaddingDimenAttr
@RequiresApi(value = 31)
public static final void setTextViewCompoundDrawablePaddingDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setCompoundDrawablePadding.
setTextViewEms
public static final void setTextViewEms(@NonNull RemoteViews receiver, @IdRes int viewId, int ems)
Equivalent to calling android.widget.TextView.setEms.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int ems |
The width of the TextView, in ems. |
setTextViewError
public static final void setTextViewError(
@NonNull RemoteViews receiver,
@IdRes int viewId,
CharSequence error
)
Equivalent to calling android.widget.TextView.setError.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
CharSequence error |
The error message for the TextView. |
setTextViewError
@RequiresApi(value = 31)
public static final void setTextViewError(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.widget.TextView.setError.
setTextViewErrorAttr
@RequiresApi(value = 31)
public static final void setTextViewErrorAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setError.
setTextViewFontFeatureSettings
@RequiresApi(value = 21)
public static final void setTextViewFontFeatureSettings(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@NonNull String fontFeatureSettings
)
Equivalent to calling android.widget.TextView.setFontFeatureSettings.
setTextViewGravity
@RequiresApi(value = 31)
public static final void setTextViewGravity(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int gravity
)
Equivalent to calling android.widget.TextView.setGravity.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int gravity |
The gravity value, from |
setTextViewHeight
public static final void setTextViewHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int pixels
)
Equivalent to calling android.widget.TextView.setHeight.
setTextViewHeight
@RequiresApi(value = 31)
public static final void setTextViewHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setHeight.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The height of the TextView. |
int unit |
The unit for |
setTextViewHeightDimen
@RequiresApi(value = 31)
public static final void setTextViewHeightDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.TextView.setHeight.
setTextViewHeightDimenAttr
@RequiresApi(value = 31)
public static final void setTextViewHeightDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setHeight.
setTextViewHighlightColor
public static final void setTextViewHighlightColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int color
)
Equivalent to calling android.widget.TextView.setHighlightColor.
setTextViewHighlightColor
@RequiresApi(value = 31)
public static final void setTextViewHighlightColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int notNight,
@ColorInt int night
)
Equivalent to calling android.widget.TextView.setHighlightColor.
setTextViewHighlightColorAttr
@RequiresApi(value = 31)
public static final void setTextViewHighlightColorAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setHighlightColor.
setTextViewHighlightColorResource
@RequiresApi(value = 31)
public static final void setTextViewHighlightColorResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.TextView.setHighlightColor.
setTextViewHint
public static final void setTextViewHint(
@NonNull RemoteViews receiver,
@IdRes int viewId,
CharSequence hint
)
Equivalent to calling android.widget.TextView.setHint.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
CharSequence hint |
The hint for the TextView. |
setTextViewHint
public static final void setTextViewHint(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.widget.TextView.setHint.
setTextViewHintAttr
@RequiresApi(value = 31)
public static final void setTextViewHintAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setHint.
setTextViewHintTextColor
public static final void setTextViewHintTextColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int color
)
Equivalent to calling android.widget.TextView.setHintTextColor.
setTextViewHintTextColor
@RequiresApi(value = 31)
public static final void setTextViewHintTextColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int notNight,
@ColorInt int night
)
Equivalent to calling android.widget.TextView.setHintTextColor.
setTextViewHintTextColorAttr
@RequiresApi(value = 31)
public static final void setTextViewHintTextColorAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setHintTextColor.
setTextViewHintTextColorResource
@RequiresApi(value = 31)
public static final void setTextViewHintTextColorResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.TextView.setHintTextColor.
setTextViewJustificationMode
@RequiresApi(value = 31)
public static final void setTextViewJustificationMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int justificationMode
)
Equivalent to calling android.widget.TextView.setJustificationMode.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int justificationMode |
The justification mode to set. |
setTextViewLetterSpacing
@RequiresApi(value = 21)
public static final void setTextViewLetterSpacing(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float letterSpacing
)
Equivalent to calling android.widget.TextView.setLetterSpacing.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float letterSpacing |
A text letter-space value in ems. |
setTextViewLineHeight
@RequiresApi(value = 31)
public static final void setTextViewLineHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setLineHeight.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The value of the dimension for the line height. |
int unit |
The unit for |
setTextViewLineHeightDimen
@RequiresApi(value = 31)
public static final void setTextViewLineHeightDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.TextView.setLineHeight.
setTextViewLineHeightDimenAttr
@RequiresApi(value = 31)
public static final void setTextViewLineHeightDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setLineHeight.
setTextViewLines
public static final void setTextViewLines(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int lines
)
Equivalent to calling android.widget.TextView.setLines.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int lines |
The number of lines for the height of the TextView. |
setTextViewLinkTextColor
public static final void setTextViewLinkTextColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int color
)
Equivalent to calling android.widget.TextView.setLinkTextColor.
setTextViewLinkTextColor
@RequiresApi(value = 31)
public static final void setTextViewLinkTextColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int notNight,
@ColorInt int night
)
Equivalent to calling android.widget.TextView.setLinkTextColor.
setTextViewLinkTextColorAttr
@RequiresApi(value = 31)
public static final void setTextViewLinkTextColorAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setLinkTextColor.
setTextViewLinkTextColorResource
@RequiresApi(value = 31)
public static final void setTextViewLinkTextColorResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.TextView.setLinkTextColor.
setTextViewLinksClickable
public static final void setTextViewLinksClickable(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean whether
)
Equivalent to calling android.widget.TextView.setLinksClickable.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean whether |
Whether detected links will be clickable (see TextView documentation). |
setTextViewMaxEms
public static final void setTextViewMaxEms(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int maxems
)
Equivalent to calling android.widget.TextView.setMaxEms.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int maxems |
The maximum width of the TextView, in ems. |
setTextViewMaxHeight
public static final void setTextViewMaxHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int maxHeight
)
Equivalent to calling android.widget.TextView.setMaxHeight.
setTextViewMaxHeight
@RequiresApi(value = 31)
public static final void setTextViewMaxHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setMaxHeight.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The maximum height of the TextView. |
int unit |
The unit for |
setTextViewMaxHeightDimen
@RequiresApi(value = 31)
public static final void setTextViewMaxHeightDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.TextView.setMaxHeight.
setTextViewMaxHeightDimenAttr
@RequiresApi(value = 31)
public static final void setTextViewMaxHeightDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setMaxHeight.
setTextViewMaxLines
public static final void setTextViewMaxLines(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int maxLines
)
Equivalent to calling android.widget.TextView.setMaxLines.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int maxLines |
The maximum number of lines for the height of the TextView. |
setTextViewMaxWidth
public static final void setTextViewMaxWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int maxWidth
)
Equivalent to calling android.widget.TextView.setMaxWidth.
setTextViewMaxWidth
@RequiresApi(value = 31)
public static final void setTextViewMaxWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setMaxWidth.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The maximum width of the TextView. |
int unit |
The unit for |
setTextViewMaxWidthDimen
@RequiresApi(value = 31)
public static final void setTextViewMaxWidthDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.TextView.setMaxWidth.
setTextViewMaxWidthDimenAttr
@RequiresApi(value = 31)
public static final void setTextViewMaxWidthDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setMaxWidth.
setTextViewMinEms
public static final void setTextViewMinEms(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int minems
)
Equivalent to calling android.widget.TextView.setMinEms.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int minems |
The minimum width of the TextView, in ems. |
setTextViewMinHeight
public static final void setTextViewMinHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int minHeight
)
Equivalent to calling android.widget.TextView.setMinHeight.
setTextViewMinHeight
@RequiresApi(value = 31)
public static final void setTextViewMinHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setMinHeight.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The minimum height of the TextView. |
int unit |
The unit for |
setTextViewMinHeightDimen
@RequiresApi(value = 31)
public static final void setTextViewMinHeightDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.TextView.setMinHeight.
setTextViewMinHeightDimenAttr
@RequiresApi(value = 31)
public static final void setTextViewMinHeightDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setMinHeight.
setTextViewMinLines
public static final void setTextViewMinLines(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int minLines
)
Equivalent to calling android.widget.TextView.setMinLines.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int minLines |
The minimum number of lines for the height of the TextView. |
setTextViewMinWidth
public static final void setTextViewMinWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int minWidth
)
Equivalent to calling android.widget.TextView.setMinWidth.
setTextViewMinWidth
@RequiresApi(value = 31)
public static final void setTextViewMinWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setMinWidth.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The minimum width of the TextView. |
int unit |
The unit for |
setTextViewMinWidthDimen
@RequiresApi(value = 31)
public static final void setTextViewMinWidthDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.TextView.setMinWidth.
setTextViewMinWidthDimenAttr
@RequiresApi(value = 31)
public static final void setTextViewMinWidthDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setMinWidth.
setTextViewPaintFlags
public static final void setTextViewPaintFlags(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int flags
)
Equivalent to calling android.widget.TextView.setPaintFlags.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int flags |
The flags for the text paint. |
setTextViewSelectAllOnFocus
public static final void setTextViewSelectAllOnFocus(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean selectAllOnFocus
)
Equivalent to calling android.widget.TextView.setSelectAllOnFocus.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean selectAllOnFocus |
Whether to select all text when the TextView is focused. |
setTextViewSingleLine
public static final void setTextViewSingleLine(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean singleLine
)
Equivalent to calling android.widget.TextView.setSingleLine.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean singleLine |
Whether the TextView is single-line. |
setTextViewText
public static final void setTextViewText(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.widget.TextView.setText.
setTextViewTextAttr
@RequiresApi(value = 31)
public static final void setTextViewTextAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setText.
setTextViewTextColor
public static final void setTextViewTextColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int color
)
Equivalent to calling android.widget.TextView.setTextColor.
setTextViewTextColor
@RequiresApi(value = 31)
public static final void setTextViewTextColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@NonNull ColorStateList colors
)
Equivalent to calling android.widget.TextView.setTextColor.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@NonNull ColorStateList colors |
The text colors to use. |
setTextViewTextColor
@RequiresApi(value = 31)
public static final void setTextViewTextColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@NonNull ColorStateList notNight,
@NonNull ColorStateList night
)
Equivalent to calling android.widget.TextView.setTextColor.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@NonNull ColorStateList notNight |
The text colors to use when night mode is not active. |
@NonNull ColorStateList night |
The text colors to use when night mode is active. |
setTextViewTextColor
@RequiresApi(value = 31)
public static final void setTextViewTextColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int notNight,
@ColorInt int night
)
Equivalent to calling android.widget.TextView.setTextColor.
setTextViewTextColorAttr
@RequiresApi(value = 31)
public static final void setTextViewTextColorAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setTextColor.
setTextViewTextColorResource
@RequiresApi(value = 31)
public static final void setTextViewTextColorResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.widget.TextView.setTextColor.
setTextViewTextScaleX
public static final void setTextViewTextScaleX(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float size
)
Equivalent to calling android.widget.TextView.setTextScaleX.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float size |
The horizontal scale factor. |
setTextViewTextSizeDimen
@RequiresApi(value = 31)
public static final void setTextViewTextSizeDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.TextView.setTextSize.
setTextViewTextSizeDimenAttr
@RequiresApi(value = 31)
public static final void setTextViewTextSizeDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setTextSize.
setTextViewWidth
public static final void setTextViewWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int pixels
)
Equivalent to calling android.widget.TextView.setWidth.
setTextViewWidth
@RequiresApi(value = 31)
public static final void setTextViewWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setWidth.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The width of the TextView. |
int unit |
The unit for |
setTextViewWidthDimen
@RequiresApi(value = 31)
public static final void setTextViewWidthDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.widget.TextView.setWidth.
setTextViewWidthDimenAttr
@RequiresApi(value = 31)
public static final void setTextViewWidthDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.widget.TextView.setWidth.
setViewAlpha
@RequiresApi(value = 31)
public static final void setViewAlpha(@NonNull RemoteViews receiver, @IdRes int viewId, float alpha)
Equivalent to calling android.view.View.setAlpha.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float alpha |
The opacity of the view. |
setViewBackgroundColor
public static final void setViewBackgroundColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int color
)
Equivalent to calling android.view.View.setBackgroundColor.
setViewBackgroundColor
@RequiresApi(value = 31)
public static final void setViewBackgroundColor(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorInt int notNight,
@ColorInt int night
)
Equivalent to calling android.view.View.setBackgroundColor.
setViewBackgroundColorAttr
@RequiresApi(value = 31)
public static final void setViewBackgroundColorAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setBackgroundColor.
setViewBackgroundColorResource
public static final void setViewBackgroundColorResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.view.View.setBackgroundColor.
setViewBackgroundResource
public static final void setViewBackgroundResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DrawableRes int resId
)
Equivalent to calling android.view.View.setBackgroundResource.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
@DrawableRes int resId |
The identifier of the resource, or 0 to remove the background. |
setViewBackgroundTintBlendMode
@RequiresApi(value = 31)
public static final void setViewBackgroundTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode blendMode
)
Equivalent to calling android.view.View.setBackgroundTintList.
setViewBackgroundTintList
@RequiresApi(value = 31)
public static final void setViewBackgroundTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.view.View.setBackgroundTintList.
setViewBackgroundTintList
@RequiresApi(value = 31)
public static final void setViewBackgroundTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.view.View.setBackgroundTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint |
setViewBackgroundTintList
@RequiresApi(value = 31)
public static final void setViewBackgroundTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNightTint,
ColorStateList nightTint
)
Equivalent to calling android.view.View.setBackgroundTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNightTint |
The tint to apply when the UI is not in night mode. |
ColorStateList nightTint |
The tint to apply when the UI is in night mode. |
setViewBackgroundTintListAttr
@RequiresApi(value = 31)
public static final void setViewBackgroundTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setBackgroundTintList.
setViewClipToOutline
@RequiresApi(value = 31)
public static final void setViewClipToOutline(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean clipToOutline
)
Equivalent to calling android.view.View.setClipToOutline.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean clipToOutline |
Whether the View's Outline should be used to clip the contents of the View. |
setViewContentDescription
public static final void setViewContentDescription(
@NonNull RemoteViews receiver,
@IdRes int viewId,
CharSequence contentDescription
)
Equivalent to calling android.view.View.setContentDescription.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
CharSequence contentDescription |
The content description. |
setViewContentDescription
@RequiresApi(value = 31)
public static final void setViewContentDescription(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.view.View.setContentDescription.
setViewContentDescriptionAttr
@RequiresApi(value = 31)
public static final void setViewContentDescriptionAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setContentDescription.
setViewElevationDimen
@RequiresApi(value = 31)
public static final void setViewElevationDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.view.View.setElevation.
setViewElevationDimen
@RequiresApi(value = 31)
public static final void setViewElevationDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.view.View.setElevation.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The base elevation of this view. |
int unit |
The unit for |
setViewElevationDimenAttr
@RequiresApi(value = 31)
public static final void setViewElevationDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setElevation.
setViewEnabled
@RequiresApi(value = 24)
public static final void setViewEnabled(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean enabled
)
Equivalent to calling android.view.View.setEnabled.
Note: setEnabled can only be called on TextView and its descendants from API 24, but is safe to call on other Views on older SDKs using RemoteViews.setBoolean directly.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean enabled |
True if this view is enabled, false otherwise. |
setViewFocusable
@RequiresApi(value = 31)
public static final void setViewFocusable(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean focusable
)
Equivalent to calling android.view.View.setFocusable.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean focusable |
If true, this view can receive the focus. |
setViewFocusable
@RequiresApi(value = 31)
public static final void setViewFocusable(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int focusable
)
Equivalent to calling android.view.View.setFocusable.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int focusable |
One of |
setViewFocusableInTouchMode
@RequiresApi(value = 31)
public static final void setViewFocusableInTouchMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean focusableInTouchMode
)
Equivalent to calling android.view.View.setFocusableInTouchMode.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean focusableInTouchMode |
If true, this view can receive the focus while in touch mode. |
setViewFocusedByDefault
@RequiresApi(value = 31)
public static final void setViewFocusedByDefault(
@NonNull RemoteViews receiver,
@IdRes int viewId,
boolean isFocusedByDefault
)
Equivalent to calling android.view.View.setFocusedByDefault.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
boolean isFocusedByDefault |
true to set this view as the default-focus view, false otherwise. |
setViewForegroundTintBlendMode
@RequiresApi(value = 31)
public static final void setViewForegroundTintBlendMode(
@NonNull RemoteViews receiver,
@IdRes int viewId,
BlendMode blendMode
)
Equivalent to calling android.view.View.setForegroundTintBlendMode.
setViewForegroundTintList
@RequiresApi(value = 31)
public static final void setViewForegroundTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@ColorRes int resId
)
Equivalent to calling android.view.View.setForegroundTintList.
setViewForegroundTintList
@RequiresApi(value = 31)
public static final void setViewForegroundTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList tint
)
Equivalent to calling android.view.View.setForegroundTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList tint |
The tint to apply, may be null to clear tint |
setViewForegroundTintList
@RequiresApi(value = 31)
public static final void setViewForegroundTintList(
@NonNull RemoteViews receiver,
@IdRes int viewId,
ColorStateList notNightTint,
ColorStateList nightTint
)
Equivalent to calling android.view.View.setForegroundTintList.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
ColorStateList notNightTint |
The tint to apply when the UI is not in night mode. |
ColorStateList nightTint |
The tint to apply when the UI is in night mode. |
setViewForegroundTintListAttr
@RequiresApi(value = 31)
public static final void setViewForegroundTintListAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setForegroundTintList.
setViewLayoutDirection
public static final void setViewLayoutDirection(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int layoutDirection
)
Equivalent to calling android.view.View.setLayoutDirection.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int layoutDirection |
One of |
setViewMinimumHeight
@RequiresApi(value = 24)
public static final void setViewMinimumHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@Px int minHeight
)
Equivalent to calling android.view.View.setMinimumHeight.
setViewMinimumHeight
@RequiresApi(value = 31)
public static final void setViewMinimumHeight(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setMinimumHeight.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The minimum height the view will try to be. |
int unit |
The unit for |
setViewMinimumHeightDimen
@RequiresApi(value = 31)
public static final void setViewMinimumHeightDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.view.View.setMinimumHeight.
setViewMinimumHeightDimenAttr
@RequiresApi(value = 31)
public static final void setViewMinimumHeightDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setMinimumHeight.
setViewMinimumWidth
@RequiresApi(value = 31)
public static final void setViewMinimumWidth(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setMinimumWidth.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The minimum width the view will try to be. |
int unit |
The unit for |
setViewMinimumWidthDimen
@RequiresApi(value = 31)
public static final void setViewMinimumWidthDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.view.View.setMinimumWidth.
setViewMinimumWidthDimenAttr
@RequiresApi(value = 31)
public static final void setViewMinimumWidthDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setMinimumWidth.
setViewPivotX
@RequiresApi(value = 31)
public static final void setViewPivotX(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float pivotX
)
Equivalent to calling android.view.View.setPivotX.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float pivotX |
The x location of the pivot point. |
setViewPivotY
@RequiresApi(value = 31)
public static final void setViewPivotY(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float pivotY
)
Equivalent to calling android.view.View.setPivotY.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float pivotY |
The y location of the pivot point. |
setViewRotation
@RequiresApi(value = 31)
public static final void setViewRotation(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float rotation
)
Equivalent to calling android.view.View.setRotation.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float rotation |
The degrees of rotation. |
setViewRotationX
@RequiresApi(value = 31)
public static final void setViewRotationX(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float rotationX
)
Equivalent to calling android.view.View.setRotationX.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float rotationX |
The degrees of X rotation. |
setViewRotationY
@RequiresApi(value = 31)
public static final void setViewRotationY(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float rotationY
)
Equivalent to calling android.view.View.setRotationY.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float rotationY |
The degrees of Y rotation. |
setViewScaleX
@RequiresApi(value = 31)
public static final void setViewScaleX(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float scaleX
)
Equivalent to calling android.view.View.setScaleX.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float scaleX |
The scaling factor. |
setViewScaleY
@RequiresApi(value = 31)
public static final void setViewScaleY(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float scaleY
)
Equivalent to calling android.view.View.setScaleY.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float scaleY |
The scaling factor. |
setViewScrollIndicators
@RequiresApi(value = 31)
public static final void setViewScrollIndicators(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int scrollIndicators
)
Equivalent to calling android.view.View.setScrollIndicators.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int scrollIndicators |
A bitmask of indicators that should be enabled, or 0 to disable all indicators. |
setViewStateDescription
@RequiresApi(value = 31)
public static final void setViewStateDescription(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@StringRes int resId
)
Equivalent to calling android.view.View.setStateDescription.
setViewStateDescription
@RequiresApi(value = 30)
public static final void setViewStateDescription(
@NonNull RemoteViews receiver,
@IdRes int viewId,
CharSequence stateDescription
)
Equivalent to calling android.view.View.setStateDescription.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
CharSequence stateDescription |
The state description. |
setViewStateDescriptionAttr
@RequiresApi(value = 31)
public static final void setViewStateDescriptionAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setStateDescription.
setViewStubInflatedId
public static final void setViewStubInflatedId(
@NonNull RemoteViews receiver,
@IdRes int viewId,
int inflatedId
)
Equivalent to calling android.view.ViewStub.setInflatedId.
Note that ViewStub may be used in RemoteViews layouts as of API 16.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
int inflatedId |
A positive integer used to identify the inflated view or |
setViewStubLayoutResource
public static final void setViewStubLayoutResource(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@LayoutRes int layoutResource
)
Equivalent to calling android.view.ViewStub.setLayoutResource.
Note that ViewStub may be used in RemoteViews layouts as of API 16.
setViewTranslationXDimen
@RequiresApi(value = 31)
public static final void setViewTranslationXDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.view.View.setTranslationX.
setViewTranslationXDimen
@RequiresApi(value = 31)
public static final void setViewTranslationXDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setTranslationX.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The horizontal position of this view relative to its left position. |
int unit |
The unit for |
setViewTranslationXDimenAttr
@RequiresApi(value = 31)
public static final void setViewTranslationXDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setTranslationX.
setViewTranslationYDimen
@RequiresApi(value = 31)
public static final void setViewTranslationYDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.view.View.setTranslationY.
setViewTranslationYDimen
@RequiresApi(value = 31)
public static final void setViewTranslationYDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setTranslationY.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The vertical position of this view relative to its top position. |
int unit |
The unit for |
setViewTranslationYDimenAttr
@RequiresApi(value = 31)
public static final void setViewTranslationYDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setTranslationY.
setViewTranslationZDimen
@RequiresApi(value = 31)
public static final void setViewTranslationZDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@DimenRes int resId
)
Equivalent to calling android.view.View.setTranslationZ.
setViewTranslationZDimen
@RequiresApi(value = 31)
public static final void setViewTranslationZDimen(
@NonNull RemoteViews receiver,
@IdRes int viewId,
float value,
int unit
)
Equivalent to calling android.widget.TextView.setTranslationZ.
| Parameters | |
|---|---|
@IdRes int viewId |
The id of the target view |
float value |
The depth of this view relative to its elevation. |
int unit |
The unit for |
setViewTranslationZDimenAttr
@RequiresApi(value = 31)
public static final void setViewTranslationZDimenAttr(
@NonNull RemoteViews receiver,
@IdRes int viewId,
@AttrRes int resId
)
Equivalent to calling android.view.View.setTranslationZ.