Android, listView items & ColorStateList -


remember colorstatelist xml? specify view use color if in state:

something like:

<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" >     <item         android:color="hex_color"         android:state_pressed=["true" | "false"]         android:state_focused=["true" | "false"] 

how enforce code: "hey view! in state! display accordingly!!" ??

my problem listview. want child appear clicked/selected, , neither of lines seem work:

m_listview.getchildat(0).requestfocus(); m_listview.getchildat(0).setpressed(true); 

forgot this.. solution was:

m_itemslistview.setitemchecked(0, true);


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -