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
sealed class NetworkResult<T>( | |
val data: T? = null, | |
val message: String? = null | |
) { | |
class Success<T>(data: T) : NetworkResult<T>(data) | |
class Error<T>(message: String?, data: T? = null) : NetworkResult<T>(data, message) | |
class Loading<T> : NetworkResult<T>() |
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
class UserDatasourceImpl @Inject constructor( | |
private val auth: FirebaseAuth, | |
) : UserDatasource { | |
override fun registerUserWithEmailAndPassword( | |
userName: String, | |
password: String, | |
): NetworkResult<Any> { | |
lateinit var networkResponse: NetworkResult<Any> |
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
NoteAdapter adapter = new NoteAdapter(); | |
RecyclerView recyclerView = findViewById(R.id.recycler_view); | |
recyclerView.setLayoutManager(new LinearLayoutManager(this)); | |
recyclerView.setAdapter(adapter); | |
adapter.setContacts(list,cxt,this); |
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
class ContactHolder extends RecyclerView.ViewHolder { | |
private TextView textViewTitle; | |
private TextView numone; | |
private TextView numtwo; | |
private TextView numthree; | |
private TextView numfour; | |
private ImageView imageview1,imageview2,imageview3,imageview4; |
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
public class ContactAdapter extends RecyclerView.Adapter<contactAdapter.ContactHolder> { | |
private List<Contact> contacts = new ArrayList<>(); | |
private Context cxt; | |
String telnum; | |
Activity activity; | |
@Override | |
public ContactHolder onCreateViewHolder(ViewGroup parent, int viewType) { |
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
public class ContactAdapter extends RecyclerView.Adapter<contactAdapter.ContactHolder> { | |
class ContactHolder extends RecyclerView.ViewHolder { |
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
public class ContactAdapter extends RecyclerView.Adapter<contactAdapter.ContactHolder>{ | |
} |
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
public class ContactAdapter extends RecyclerView.Adapter<contactAdapter.ContactHolder> { | |
private List<Contact> contacts = new ArrayList<>(); | |
private Context cxt; | |
String telnum; | |
Activity activity; | |
@Override | |
public ContactHolder onCreateViewHolder(ViewGroup parent, int viewType) { |
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
public class Contact { | |
private int id; | |
private String title; | |
private String description; | |
private int priority; | |
private String numone; | |
private String numtwo; | |
private String numthree; | |
private String numfour; | |
private String type; |
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
const functions = require('firebase-functions'); | |
let admin = require('firebase-admin'); | |
admin.initializeApp(functions.config().firebase); | |
const actionTypeNewLike = "new_like"; | |
const actionTypeNewComment = "new_comment"; | |
const actionTypeNewPost = "new_post"; | |
const notificationTitle = "Notification"; |
NewerOlder