Add content description setter to RemoteViews
bug:5480389 Change-Id: I66616f379a244ba7f3552d766f3aaa77f207550a
This commit is contained in:
@@ -26782,6 +26782,7 @@ package android.widget {
|
||||
method public void setChar(int, java.lang.String, char);
|
||||
method public void setCharSequence(int, java.lang.String, java.lang.CharSequence);
|
||||
method public void setChronometer(int, long, java.lang.String, boolean);
|
||||
method public void setContentDescription(int, java.lang.CharSequence);
|
||||
method public void setDisplayedChild(int, int);
|
||||
method public void setDouble(int, java.lang.String, double);
|
||||
method public void setEmptyView(int, int);
|
||||
|
||||
@@ -4219,6 +4219,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
|
||||
*
|
||||
* @attr ref android.R.styleable#View_contentDescription
|
||||
*/
|
||||
@RemotableViewMethod
|
||||
public void setContentDescription(CharSequence contentDescription) {
|
||||
mContentDescription = contentDescription;
|
||||
}
|
||||
|
||||
@@ -1545,6 +1545,16 @@ public class RemoteViews implements Parcelable, Filter {
|
||||
addAction(new ReflectionAction(viewId, methodName, ReflectionAction.INTENT, value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Equivalent to calling View.setContentDescription
|
||||
*
|
||||
* @param viewId The id of the view whose content description should change
|
||||
* @param contentDescription The new content description for the view
|
||||
*/
|
||||
public void setContentDescription(int viewId, CharSequence contentDescription) {
|
||||
setCharSequence(viewId, "setContentDescription", contentDescription);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inflates the view hierarchy represented by this object and applies
|
||||
* all of the actions.
|
||||
|
||||
Reference in New Issue
Block a user