Skip to content

Instantly share code, notes, and snippets.

View saurabhdhillon's full-sized avatar

Saurabh Dhillon saurabhdhillon

View GitHub Profile
@saurabhdhillon
saurabhdhillon / ZoomDragImageView.kt
Created December 4, 2019 12:18
Image view to perform pinch and drag operation
class DelhiveryZoomDragImageView(
internal var context: Context,
attr: AttributeSet
) : AppCompatImageView(context, attr) {
var lastEvent: FloatArray? = null
var d = 0f
var newRot = 0f
@saurabhdhillon
saurabhdhillon / SpanningLinearLayoutManager.java
Created February 14, 2019 11:22
Distribute items inside recycle-view evenly.
package com.ed.lib.base.utils;
import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.ViewGroup;
public class SpanningLinearLayoutManager extends LinearLayoutManager {