Skip to content

Instantly share code, notes, and snippets.

View sumanabhi's full-sized avatar
🧑‍💻
learning and contributing

Abhinav Sumaan sumanabhi

🧑‍💻
learning and contributing
View GitHub Profile
@sumanabhi
sumanabhi / ViewBinder.kt
Last active June 1, 2021 14:59
This file is to relplace the boilerplate code of getting viewBinding of the layout associated with (an Activity or a Fragment)
package com.sumanabhi.app.ktx.extension
import android.view.LayoutInflater
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.lifecycle.Lifecycle.Event
import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.LifecycleOwner
import androidx.viewbinding.ViewBinding
@sumanabhi
sumanabhi / NonScrollRecyclerView.java
Last active December 7, 2018 20:17
This helps to make the RecyclerView height at runtime based on their child.
package com.animus.app.CustomViews;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.ViewGroup;
/**
* Created by app on 23/11/17.
*/
package com.sumanabhi.app.customViews;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.RectF;