This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { | |
@Override | |
public void onRefresh() { | |
mAdapter.refresh(); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Start Listening Adapter | |
@Override | |
protected void onStart() { | |
super.onStart(); | |
mAdapter.startListening(); | |
} | |
//Stop Listening Adapter | |
@Override | |
protected void onStop() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final EasyUpiPayment easyUpiPayment = new EasyUpiPayment.Builder() | |
.with(this) | |
.setPayeeVpa("shreyaspatil@upi") | |
.setPayeeName("Shreyas Patil") | |
.setTransactionId("20190603022401") | |
.setTransactionRefId("0120192019060302240") | |
.setDescription("For Today's Food") | |
.setAmount("90.00") | |
.build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onTransactionCompleted(TransactionDetails transactionDetails) { | |
// Transaction Completed | |
Log.d("TransactionDetails", transactionDetails.toString()); | |
} | |
@Override | |
public void onTransactionSuccess() { | |
// Payment Success | |
Toast.makeText(this, "Success", Toast.LENGTH_SHORT).show(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MaterialDialog mDialog = new MaterialDialog.Builder(this) | |
.setTitle("Delete?") | |
.setMessage("Are you sure want to delete this file?") | |
.setCancelable(false) | |
.setPositiveButton("Delete", R.drawable.ic_delete, new MaterialDialog.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialogInterface, int which) { | |
// Delete Operation | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BottomSheetMaterialDialog mBottomSheetDialog = new BottomSheetMaterialDialog.Builder(this) | |
.setTitle("Delete?") | |
.setMessage("Are you sure want to delete this file?") | |
.setCancelable(false) | |
.setPositiveButton("Delete", R.drawable.ic_delete, new BottomSheetMaterialDialog.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialogInterface, int which) { | |
Toast.makeText(getApplicationContext(), "Deleted!", Toast.LENGTH_SHORT).show(); | |
dialogInterface.dismiss(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MaterialButton mDialog = new MaterialDialog.Builder(this) | |
// Other Methods to create Dialog........ | |
.setAnimation(R.raw.delete_anim) | |
.build() | |
//... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MaterialButton mDialog = new MaterialDialog.Builder(this) | |
// Other Methods to create Dialog........ | |
.setAnimation("delete_anim.json") | |
.build() | |
//... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
mDialog.setOnShowListener(this); | |
mDialog.setOnCancelListener(this); | |
mDialog.setOnDismissListener(this); | |
} | |
@Override | |
public void onShow(DialogInterface dialogInterface) { | |
// Dialog is Displayed | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RecyclerView | |
implementation 'androidx.recyclerview:recyclerview:1.0.0' | |
// Firebase & Firestore SDK | |
implementation 'com.google.firebase:firebase-core:17.0.1' | |
implementation 'com.google.firebase:firebase-firestore:20.1.0' | |
// Firestore FirebaseUI Library | |
implementation 'com.firebaseui:firebase-ui-firestore:5.0.0' |