【问题标题】:Is it Possible to put GridView with baseAdapter in appWidget?是否可以将带有 baseAdapter 的 GridView 放在 appWidget 中?
【发布时间】:2013-07-20 20:44:18
【问题描述】:

我正在制作一个计算器小部件,它有 2 个文本视图和一个带有 baseadapter 的网格视图,但我不知道如何将它放入 appwidget 中......它只显示没有键的布局。

【问题讨论】:

    标签: android gridview android-widget android-appwidget baseadapter


    【解决方案1】:

    对于应用小部件,您必须使用RemoteViewsFactory 来填充ListViewsGridViews。它类似于 Adatper,但它创建 RemoteViews 而不是 View

    有关使用信息,请参阅this example

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-17
      • 2020-01-11
      • 1970-01-01
      • 2017-04-16
      • 2015-11-28
      • 1970-01-01
      相关资源
      最近更新 更多