How can I change the font / typeface of a button in an Android widget? When working with normal view is this no problem:
// Within the app
Button myButton = (Button)rootView.findViewById(R.id.myAppButton);
myButton.setTypeface(someTypeface);
However, when working with a widget, views cannot be accessed directly but only via RemoteViews
:
// Widget
RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widgetContent);
remoteViews.setTextViewText(R.id.myWidgetButton, "Some Text");
Is it somehow possible to set the typeface of the remote button as well?