Changing the dynamic addition of a TextView to a widget

I tried changing the TextView add-on that fits into the widget. Directly through 'findViewById' is not possible, because the class is distributed from AppWidgetProvider.

So I tried using remoteViews.setBundle with the following code. But this is not a solution.

Bundle b = new Bundle(4);
b.putInt("left", 5);b.putInt("top", 5);b.putInt("right",
5);b.putInt("bottom", 5);
remoteViews.setBundle(R.id.name1, "setPadding", b);

Does anyone have a solution for me?

+3
source share
1 answer

. , setPadding "@RemotableViewMethod", RemoteViews. , , .

+2

Source: https://habr.com/ru/post/1773832/


All Articles