use of com.flyco.dialogsamples.adapter.HomeAdapter in project FlycoDialog_Master by H07000223.
the class DialogHomeActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac_dialog_home);
ButterKnife.bind(this);
mMenuItems.add(new DialogMenuItem("收藏", R.mipmap.ic_winstyle_favor));
mMenuItems.add(new DialogMenuItem("下载", R.mipmap.ic_winstyle_download));
mMenuItems.add(new DialogMenuItem("分享", R.mipmap.ic_winstyle_share));
mMenuItems.add(new DialogMenuItem("删除", R.mipmap.ic_winstyle_delete));
mMenuItems.add(new DialogMenuItem("歌手", R.mipmap.ic_winstyle_artist));
mMenuItems.add(new DialogMenuItem("专辑", R.mipmap.ic_winstyle_album));
mBasIn = new BounceTopEnter();
mBasOut = new SlideBottomExit();
View decorView = getWindow().getDecorView();
HomeAdapter adapter = new HomeAdapter(mContext);
mElv.setAdapter(adapter);
// extend all group
for (int i = 0; i < mGroups.length; i++) {
mElv.expandGroup(i);
}
mElv.setOnChildClickListener(this);
mElv.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
return true;
}
});
}
Aggregations