Search in sources :

Example 1 with JigsawGridView

use of com.jigdraw.draw.views.JigsawGridView in project android-jigsaw-puzzle by julesbond007.

the class JigsawActivity method initViews.

/**
 * Initialize the jigsaw grid view
 */
private void initViews() {
    Log.d(TAG, "initializing jigsaw grid view");
    final JigsawGridView gridView = findViewById(R.id.jigsaw_grid);
    JigsawLoader task = new JigsawLoader(getApplicationContext(), gridView);
    Bundle bundle = getIntent().getExtras();
    if (bundle != null) {
        LongParcelable parcelable = bundle.getParcelable(ORIGINAL_IMG_ID);
        if (parcelable != null) {
            task.execute(parcelable.getData());
        }
    }
    gridView.setOnItemLongClickListener(onItemLongClickListener(gridView));
    gridView.setOnDropListener(onDropListener(gridView));
    gridView.setOnDragListener(onDragListener());
}
Also used : Bundle(android.os.Bundle) LongParcelable(com.jigdraw.draw.model.LongParcelable) JigsawLoader(com.jigdraw.draw.tasks.JigsawLoader) JigsawGridView(com.jigdraw.draw.views.JigsawGridView)

Aggregations

Bundle (android.os.Bundle)1 LongParcelable (com.jigdraw.draw.model.LongParcelable)1 JigsawLoader (com.jigdraw.draw.tasks.JigsawLoader)1 JigsawGridView (com.jigdraw.draw.views.JigsawGridView)1