Search in sources :

Example 1 with HomeAdapter

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;
        }
    });
}
Also used : DialogMenuItem(com.flyco.dialog.entity.DialogMenuItem) BounceTopEnter(com.flyco.animation.BounceEnter.BounceTopEnter) SlideBottomExit(com.flyco.animation.SlideExit.SlideBottomExit) HomeAdapter(com.flyco.dialogsamples.adapter.HomeAdapter) View(android.view.View) AdapterView(android.widget.AdapterView) ExpandableListView(android.widget.ExpandableListView) ExpandableListView(android.widget.ExpandableListView)

Aggregations

View (android.view.View)1 AdapterView (android.widget.AdapterView)1 ExpandableListView (android.widget.ExpandableListView)1 BounceTopEnter (com.flyco.animation.BounceEnter.BounceTopEnter)1 SlideBottomExit (com.flyco.animation.SlideExit.SlideBottomExit)1 DialogMenuItem (com.flyco.dialog.entity.DialogMenuItem)1 HomeAdapter (com.flyco.dialogsamples.adapter.HomeAdapter)1