Skip to content

Instantly share code, notes, and snippets.

@saeednt
saeednt / MenuHolder.java
Last active April 11, 2016 07:13
A RecyclerView adapter which removes the need of creating a new adapter for each and every list in the program. This adapter only takes the ViewHolder in which u adapt the object and the view
// this is a sample ViewHolder to demostrate the use of interface MultiViewtype
// this ViewHolder is for adapting both MenuItem and Category objects
import android.content.Context;
import android.graphics.Color;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
@saeednt
saeednt / AVC.java
Created April 5, 2016 11:41
This class is used for controlling android versions more easily
import android.os.Build;
/**
* This class is used to only make android version controlling easy
*/
public class AVC {
public static boolean isGingerBread(){
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD;
}