Skip to content

Instantly share code, notes, and snippets.


Manoj Bhadane manojbhadane

Block or report user

Report or block manojbhadane

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PaymentCardViewGradle.gradle
//Step 1. Add the JitPack repository to your build file
allprojects {
repositories {
maven { url '' }
View PaymentCardViewMaven.xml
Step 1. Add the JitPack repository to your build file
// Init
PaymentCardView paymentCard = (PaymentCardView) findViewById(;
// Options
paymentCard.setCardTitle("Pay Now"); // set from xml as well
paymentCard.setSubmitButtonText("Done"); // set from xml as well
// Callbacks
View CustomTextView.png
![alt text](
View activity_customview.xml
android:text="Ubuntu Regular"
app:fontname="UbuntuRegular" />
View attrs.xml
<?xml version="1.0" encoding="utf-8"?>
<declare-styleable name="CustomTextView">
<attr name="fontname" format="integer">
<enum name="UbuntuRegular" value="1" />
<enum name="UbuntuBold" value="2" />
<enum name="UbuntuItalic" value="3" />
public class CustomTextView extends AppCompatTextView {
public CustomTextView(Context context) {
public CustomTextView(Context context, AttributeSet attrs) {
super(context, attrs);
setFont(context, attrs);
public class SampleAdapter extends GenericAdapter<Model, ListitemGenericAdapterBinding> {
public SampleAdapter(Context context, ArrayList<Model> arrayList) {
super(context, arrayList);
public int getLayoutResId() {
return R.layout.listitem_generic_adapter;
public abstract class GenericAdapter<T, D> extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private Context mContext;
private ArrayList<T> mArrayList;
public abstract int getLayoutResId();
public abstract void onBindData(T model, int position, D dataBinding);
public abstract void onItemClick(T model, int position);
mDataBinding.recyclerview.setAdapter(new GenericAdapter<String, ListitemGenericAdapterBinding>(this,getStringsList()) {
public int getLayoutResId() {
return R.layout.listitem_generic_adapter;
public void onBindData(String model, int position, ListitemGenericAdapterBinding dataBinding) {
dataBinding.txtName.setText("String " + position);
You can’t perform that action at this time.