
この状態で一番したの「夏目漱石」をタップすると、
child は下に隠れて見えなくなってしまう

勝手にスクロールして、child が見えるようになってくれる
ようにするには、
public void smoothScrollToPosition (int position)
を使う
注: API Level 8

ExpandableListView el = getExpandableListView();
el.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
((ExpandableListView)getExpandableListView()).smoothScrollToPosition(groupPosition);
return false;
}
});
setContentView(el);
0 件のコメント:
コメントを投稿