RemoteViews setTextViewText - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for RemoteViews setTextViewText method.

This code example shows how to use the following methods:setTextViewText
	} 
 
	@Kroll.method 
	public void setTextViewText(int viewId, String text)
	{ 
		remoteViews.setTextViewText(viewId, text);
	} 
 
	@Kroll.method 
	public void setViewVisibility(int viewId, int visibility)
	{ 
		remoteViews.setViewVisibility(viewId, visibility);
	} 
 
	@Kroll.method 
	public void setChronometer(int viewId, long base, String format, boolean started)
	{ 
		remoteViews.setChronometer(viewId, base, format, started);
	} 
 
7
CodeRank
This code example shows how to use the following methods:updateAppWidget, setOnClickPendingIntent, setTextViewText
	 */ 
	protected abstract ComponentName getComponentName();
	 
	@Override 
	public void onStart(Intent intent, int startId) {
		RemoteViews updateViews = new RemoteViews(this.getPackageName(), getLayoutID());
		updateViews.setTextViewText(getButtonID(), getNetInfoText(this));
 
		Intent settingIntent = new Intent(Settings.ACTION_WIRELESS_SETTINGS);
		PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,
				settingIntent, 0);
		updateViews.setOnClickPendingIntent(getButtonID(), pendingIntent);
		AppWidgetManager.getInstance(this).updateAppWidget(getComponentName(),
				updateViews);
		super.onStart(intent, startId);
	} 
 
	@Override 
	public IBinder onBind(Intent arg0) {
		return null; 
6
CodeRank
This code example shows how to use the following methods:setEmptyView, setOnClickPendingIntent, setRemoteAdapter, setTextViewText, setViewVisibility
  } 
 
  private static RemoteViews getWidgetWithTitle(Context paramContext, String paramString, int paramInt1, int paramInt2)
  { 
    RemoteViews localRemoteViews = getBaseWithVisibleViews(paramContext, new int[] { 2131231184 });
    localRemoteViews.setEmptyView(2131231184, 2131231185);
    Intent localIntent = new Intent(paramContext, RecommendationsViewService.class);
    localIntent.setData(Uri.parse("content://market/factory/for/" + paramInt1));
    localIntent.putExtra("appWidgetId", paramInt1);
    localRemoteViews.setRemoteAdapter(2131231184, localIntent);
    if (!TextUtils.isEmpty(paramString))
    { 
      localRemoteViews.setTextViewText(2131231125, paramString.toUpperCase());
      localRemoteViews.setOnClickPendingIntent(2131230744, PendingIntent.getActivity(paramContext, 0, IntentUtils.createBrowseIntent(paramContext, DfeApiImpl.getRecommendationsBrowseUrl(paramInt2), paramString, paramInt2, "widget", true), 0));
      localRemoteViews.setViewVisibility(2131230744, 0);
    } 
    return localRemoteViews;
  } 
 
  private static void showAccountsNeeded(Context paramContext, int paramInt)
6
CodeRank
This code example shows how to use the following methods:setOnClickPendingIntent, setTextViewText
            message = getResources().getText(res).toString();
        } 
        if (mRemoteViews == null || mRemoteViews.getLayoutId() != mRAlertLayout) {
            mRemoteViews = getRemoteView(mRAlertLayout);
        } 
        mRemoteViews.setTextViewText(mRAlertMessage, message);
        mManager.updateAppWidget(mWidget, mRemoteViews);
        Log.d("Widget.displayAlert", "Alert displayed with message: "+message);
 
    } 
 
    public void displayLoader(String message) {
        if (mRLoaderLayout == 0) {
            mRLoaderLayout = getResources().getIdentifier("widget_loader", "layout", getPackageName());
            mRLoaderMessage = getResources().getIdentifier("loadermessage", "id", getPackageName());
        } 
        if (message == null || message.length() == 0) {
            int res = getResources().getIdentifier("widget_loader", "string", getPackageName());
            message = getResources().getText(res).toString();
        } 

6
CodeRank
This code example shows how to use the following methods:updateAppWidget, setOnClickPendingIntent, setTextViewText
    int i = 0;
    if (1 == 1) 
      i = 2130903059;
    if (1 != 0) 
    { 
      RemoteViews localRemoteViews = new RemoteViews(paramContext.getPackageName(), i);
      localRemoteViews.setTextViewText(2131296296, "--------");
      if (1 == 2) 
        localRemoteViews.setOnClickPendingIntent(2131296296, PendingIntent.getBroadcast(paramContext, 0, new Intent(APPWIDGET_UPDATE), 0));
      if (1 == 1) 
        localRemoteViews.setOnClickPendingIntent(2131296317, PendingIntent.getActivity(paramContext, 0, new Intent(paramContext, SplashActivity.class), 0));
      AppWidgetManager.getInstance(paramContext).updateAppWidget(paramInt, localRemoteViews);
    } 
  } 
 
  public void onDisabled(Context paramContext)
  { 
    ((AuthenticatorApplication)paramContext.getApplicationContext()).unbindTokenService();
    paramContext.stopService(new Intent(paramContext, TokenService.class));
  } 
6
CodeRank
This code example shows how to use the following methods:setTextColor, setTextViewText
      prefix = "";
    } 
 
    if (selectedTime != timeModel.getOriginal()) {
      if (selectedTime.after(timeModel.getOriginal())) {
        remoteView.setTextColor(viewId, Color.RED);
      } else { 
        remoteView.setTextColor(viewId, Color.GREEN);
      } 
    } 
    remoteView.setTextViewText(viewId, prefix + DateUtil.formatShortDateTime(selectedTime));
  } 
 
  public void onDeleted(final Context context, final int[] appWidgetIds) {
 
  } 
 
  public void onEnabled(final Context context) {
 
  } 
5
CodeRank
This code example shows how to use the following methods:setImageViewBitmap, setTextViewText
    { 
        if(PreferenceManager.getDefaultSharedPreferences(mContext).getBoolean("notif_messages", false))
        { 
            if(bitmap != null)
            { 
                RemoteViews remoteviews = new RemoteViews(mContext.getPackageName(), 0x7f030066);
                remoteviews.setImageViewBitmap(0x7f0e002d, bitmap);
                remoteviews.setTextViewText(0x7f0e0017, getDisplayName(l));
                remoteviews.setTextViewText(0x7f0e0107, s);
                notification.contentView = remoteviews;
            } 
            mNotificationManager.notify(4, notification);
        } 
    } 
 
    private String getDisplayName(long l)
    { 
        String s;
        if(mDisplayName.containsKey(Long.valueOf(l)))
        { 
5
CodeRank
This code example shows how to use the following methods:setOnClickFillInIntent, setTextViewText
		return null; 
	} 
 
	@Override 
	public RemoteViews getViewAt(int position) {
		RemoteViews row = new RemoteViews(context.getPackageName(),
				android.R.layout.simple_list_item_1);
		row.setTextViewText(android.R.id.text1, items[position]);
		Intent intent = new Intent();
		Bundle extras = new Bundle();
		extras.putString("word", items[position]);
		intent.putExtras(extras);
		row.setOnClickFillInIntent(android.R.id.text1, intent);
		return row;
	} 
 
	@Override 
	public int getViewTypeCount() { 
		return 1; 
	} 
5
CodeRank
This code example shows how to use the following methods:setImageViewResource, setProgressBar, setTextViewText, setViewVisibility
		 * @param resId 
		 *            resource id 
		 * @return view 
		 */ 
		private RemoteViews makeRemoteViews(int resId) {
			RemoteViews contentView = new RemoteViews(
					mContext.getPackageName(), resId);
			if (mSmallIcon != 0) {
				contentView.setImageViewResource(R.id.appIcon, mSmallIcon);
				contentView.setViewVisibility(R.id.appIcon, View.VISIBLE);
			} else { 
				contentView.setViewVisibility(R.id.appIcon, View.GONE);
			} 
			if (mContentTitle != null) {
				contentView.setTextViewText(R.id.title, mContentTitle);
			} 
			if (mContentText != null) {
				contentView.setTextViewText(R.id.description, mContentText);
			} 
 

5
CodeRank
This code example shows how to use the following methods:setTextViewText
				.setOnlyAlertOnce(true); 
	} 
 
	protected void setTextViewText(int id, String text) {
		if (mNotificationView != null) {
			mNotificationView.setTextViewText(id, text);
		} 
	} 
 
	protected void setViewEnabled(int viewId, boolean enabled) {
		if (mNotificationView != null) {
			mNotificationView.setBoolean(viewId, "setEnabled", enabled);
		} 
	} 
 
	protected void setViewVisibility(int viewId, int visible) {
		if (mNotificationView != null) {
			mNotificationView.setViewVisibility(viewId, visible);
		} 
	} 
5
CodeRank

Related RemoteViews setTextViewText Questions & Answers:

setTextViewText Method Overview
Equivalent to calling TextView.setText
See Code Examples for other Android RemoteViews Methods: