Open AndyGu opened 8 years ago
Not the best solution, but you could call notifyDataChanged()
which should cause pinned section view to be recreated from the changed section view.
Where can I set notifyDataChanged()
?
You can mark the textview state when onClick. Refresh the state in adapter getView()
For example:
public View getView(int position, View convertView, ViewGroup parent) {
switch(viewType) {
case HEADER_VIEW:
//init view
//refresh state
refreshState(state);
//set click event
textView.setOnClickListener(v -> {
//mark the state
int state = 1;
});
}
}
I set a textview in section , then set a clicklistener of it so it can change its background when I click it. But after I scroll the list, I found that the section can't reserve its status. After the section get to the top of the list, or scroll down when section was on the top of the list, it turned to be the orign background color, pls help check this issue