Android的RemoteViews

 能在另一个进程中显示页面布局的层次。层次是在布局文件中定义,它提供了一些改变布局文件的方法定义。

该类最重要的作用就是能够在另一个进程中使用!!!

void addView(int viewId, RemoteViews nestedView)
Equivalent to calling addView(View) after inflating the given RemoteViews.
View apply( Context context, ViewGroup parent)
Inflates the view hierarchy represented by this object and applies all of the actions.
RemoteViews clone()
Creates and returns a copy of this Object.
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
int getLayoutId()
String getPackage()
boolean onLoadClass( Class clazz)
Hook to allow clients of the LayoutInflater to restrict the set of Views that are allowed to be inflated.
void reapply( Context context, View v)
Applies all of the actions to the provided view.
void removeAllViews(int viewId)
Equivalent to calling removeAllViews().
void setBitmap(int viewId, String methodName, Bitmap value)
Call a method taking one Bitmap on a view in the layout for this RemoteViews.
void setBoolean(int viewId, String methodName, boolean value)
Call a method taking one boolean on a view in the layout for this RemoteViews.
void setBundle(int viewId, String methodName, Bundle value)
Call a method taking one Bundle on a view in the layout for this RemoteViews.
void setByte(int viewId, String methodName, byte value)
Call a method taking one byte on a view in the layout for this RemoteViews.
void setChar(int viewId, String methodName, char value)
Call a method taking one char on a view in the layout for this RemoteViews.
void setCharSequence(int viewId, String methodName, CharSequence value)
Call a method taking one CharSequence on a view in the layout for this RemoteViews.
void setChronometer(int viewId, long base, String format, boolean started)
void setDisplayedChild(int viewId, int childIndex)
Equivalent to calling setDisplayedChild(int)
void setDouble(int viewId, String methodName, double value)
Call a method taking one double on a view in the layout for this RemoteViews.
void setEmptyView(int viewId, int emptyViewId)
Equivalent to calling AdapterView.setEmptyView
void setFloat(int viewId, String methodName, float value)
Call a method taking one float on a view in the layout for this RemoteViews.
void setImageViewBitmap(int viewId, Bitmap bitmap)
Equivalent to calling ImageView.setImageBitmap
void setImageViewResource(int viewId, int srcId)
Equivalent to calling ImageView.setImageResource
void setImageViewUri(int viewId, Uri uri)
Equivalent to calling ImageView.setImageURI
void setInt(int viewId, String methodName, int value)
Call a method taking one int on a view in the layout for this RemoteViews.
void setIntent(int viewId, String methodName, Intent value)
void setLong(int viewId, String methodName, long value)
Call a method taking one long on a view in the layout for this RemoteViews.
void setOnClickFillInIntent(int viewId, Intent fillInIntent)
When using collections (eg.
void setOnClickPendingIntent(int viewId, PendingIntent pendingIntent)
Equivalent to calling setOnClickListener(android.view.View.OnClickListener) to launch the provided PendingIntent.
void setPendingIntentTemplate(int viewId, PendingIntent pendingIntentTemplate)
When using collections (eg.
void setProgressBar(int viewId, int max, int progress, boolean indeterminate)
Equivalent to calling ProgressBar.setMax, ProgressBar.setProgress, and ProgressBar.setIndeterminate If indeterminate is true, then the values for max and progress are ignored.
void setRelativeScrollPosition(int viewId, int offset)
Equivalent to calling smoothScrollToPosition(int, int).
void setRemoteAdapter(int viewId, Intent intent)
Equivalent to calling setRemoteViewsAdapter(Intent).
void setRemoteAdapter(int appWidgetId, int viewId, Intent intent)
This method is deprecated. This method has been deprecated. See setRemoteAdapter(int, Intent)
void setScrollPosition(int viewId, int position)
Equivalent to calling smoothScrollToPosition(int, int).
void setShort(int viewId, String methodName, short value)
Call a method taking one short on a view in the layout for this RemoteViews.
void setString(int viewId, String methodName, String value)
Call a method taking one String on a view in the layout for this RemoteViews.
void setTextColor(int viewId, int color)
Equivalent to calling setTextColor(int).
void setTextViewText(int viewId, CharSequence text)
Equivalent to calling TextView.setText
void setUri(int viewId, String methodName, Uri value)
Call a method taking one Uri on a view in the layout for this RemoteViews.
void setViewVisibility(int viewId, int visibility)
Equivalent to calling View.setVisibility
void showNext(int viewId)
Equivalent to calling showNext()
void showPrevious(int viewId)
Equivalent to calling showPrevious()
void writeToParcel( Parcel dest, int flags)
Flatten this object in to a Parcel

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

计算机刘老师

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值