expand/contract in response to click anywhere

This commit is contained in:
Eric House 2014-03-27 08:45:12 -07:00
parent 3f3e9f5389
commit fb3b6ff96d

View file

@ -63,7 +63,9 @@ public class GameListGroup extends LinearLayout
result.m_groupPosition = groupPosition; result.m_groupPosition = groupPosition;
result.m_groupID = groupID; result.m_groupID = groupID;
result.m_expanded = expanded; result.m_expanded = expanded;
result.setButton();
result.setButton(); // in case onFinishInflate already called
return result; return result;
} }
@ -78,9 +80,14 @@ public class GameListGroup extends LinearLayout
super.onFinishInflate(); super.onFinishInflate();
m_etv = (ExpiringTextView)findViewById( R.id.game_name ); m_etv = (ExpiringTextView)findViewById( R.id.game_name );
m_expandButton = (ImageButton)findViewById( R.id.expander ); m_expandButton = (ImageButton)findViewById( R.id.expander );
// click on me OR the button expands/contracts...
setOnClickListener( this );
m_expandButton.setOnClickListener( this ); m_expandButton.setOnClickListener( this );
m_dsdel = new DrawSelDelegate( this ); m_dsdel = new DrawSelDelegate( this );
setOnLongClickListener( this ); setOnLongClickListener( this );
setButton(); setButton();
} }