Hello,
I am looking to allow the user to change text color, text size, text weight, and gravity for a widget, thus these attributes need to be edited from the code. I've managed to change text color easy enough using RemoteViews:
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout);
views.setTextColor(R.id.widgetName, color);
But RemoteViews of course doesn't have methods for altering the other 3 attributes. I know TextView has methods to do exactly what I want, but how would I write the code exactly to manipulate a widget layout?
Thank you!
Matt.
I am looking to allow the user to change text color, text size, text weight, and gravity for a widget, thus these attributes need to be edited from the code. I've managed to change text color easy enough using RemoteViews:
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout);
views.setTextColor(R.id.widgetName, color);
But RemoteViews of course doesn't have methods for altering the other 3 attributes. I know TextView has methods to do exactly what I want, but how would I write the code exactly to manipulate a widget layout?
Thank you!
Matt.