【问题标题】:Android-Widget : Changing ListView selector color using RemoteViewAndroid-Widget:使用 RemoteView 更改 ListView 选择器颜色
【发布时间】:2011-09-28 22:17:09
【问题描述】:

是否可以使用 remoteview 设置 appWidget 上存在的 listView 的选择器颜色。基本上我想根据用户选择的主题来改变它的颜色,所以我不能在布局xml中定义它。请帮忙

【问题讨论】:

    标签: android android-widget remoteview


    【解决方案1】:

    您应该可以通过将主题的列表选择器 ID 传递给远程列表视图来做到这一点

    rv.setInt(R.id.myList, "setSelector", listSelectorDrawableId);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多