Search code examples
androidandroid-widgetremoteview

Android-Widget : Changing ListView selector color using RemoteView


Is it possible to set the selector color of listView present on the appWidget using remoteview. Basically I wanted to change its color according to the theme selected by user, so I can't define it in the layout xml. Please help


Solution

  • You should be able to do so by passing the list-selector id of your theme to the remote listview via

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