tjerkw / Android-SlideExpandableListView

A better ExpandableListView, with animated expandable views for each list item
Apache License 2.0
1.98k stars 741 forks source link

DPAD support #69

Closed rekire closed 10 years ago

rekire commented 10 years ago

Well I know no new devices with this feature but I guess it is nice to have. If I press on the button nothings happen, I expect that the view should expand. For doing this you just need to add this view lines to ActionSlideExpandableListView.java:

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    if(keyCode == KeyEvent.KEYCODE_DPAD_CENTER || keyCode == KeyEvent.KEYCODE_ENTER) {
        SlideExpandableListAdapter adapter = (SlideExpandableListAdapter)getAdapter();
        adapter.getExpandToggleButton(getSelectedView()).performClick();
        return true;
    }
    return super.onKeyDown(keyCode, event);
}

But I'm not able to select the inner buttons, if somebody has an idea please add it :-)

rekire commented 10 years ago

Dub of #77