RemoteViews setLayoutParams?

前端 未结 1 1260
执念已碎
执念已碎 2021-01-02 16:48

I would like to set the height of a TextView to WRAP_CONTENT remotely.

How would I do that, since there is no remoteviews.setLayoutP

相关标签:
1条回答
  • 2021-01-02 17:24

    When you create the RemoteViews, pass in a resource ID to the constructor that has the TextView set to height set to wrap_content. Remember that when you send updates over, you are effectively redrawing the app widget, so you can use your layout files to affect changes that you cannot do via methods on RemoteViews.

    0 讨论(0)
提交回复
热议问题