use of com.manan.dev.ec2018app.Models.BrixxEventModel in project EC2018App by Manan-YMCA.
the class StandUpFragment method attachDatabaseListener.
private void attachDatabaseListener() {
if (mChildEventListener == null) {
mChildEventListener = new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
if (dataSnapshot.getKey().equals("hassrath")) {
BrixxEventModel w = dataSnapshot.getValue(BrixxEventModel.class);
// Toast.makeText(mContext,dataSnapshot.getValue().toString(),Toast.LENGTH_SHORT).show();
updateUI(w);
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String s) {
try {
if (dataSnapshot.getKey().equals("hassrath")) {
BrixxEventModel w = dataSnapshot.getValue(BrixxEventModel.class);
updateUI(w);
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
}
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String s) {
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
};
mDatabaseReference.addChildEventListener(mChildEventListener);
}
}
use of com.manan.dev.ec2018app.Models.BrixxEventModel in project EC2018App by Manan-YMCA.
the class MrCulFragment method attachDatabaseListener.
private void attachDatabaseListener() {
if (mChildEventListener == null) {
mChildEventListener = new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
if (dataSnapshot.getKey().equals("mrmsculmyca")) {
BrixxEventModel w = dataSnapshot.getValue(BrixxEventModel.class);
updateUI(w);
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String s) {
try {
if (dataSnapshot.getKey().equals("mrmsculmyca")) {
BrixxEventModel w = dataSnapshot.getValue(BrixxEventModel.class);
updateUI(w);
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
}
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String s) {
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
};
mDatabaseReference.addChildEventListener(mChildEventListener);
}
}
use of com.manan.dev.ec2018app.Models.BrixxEventModel in project EC2018App by Manan-YMCA.
the class RangritiFragment method attachDatabaseListener.
private void attachDatabaseListener() {
if (mChildEventListener == null) {
mChildEventListener = new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
if (dataSnapshot.getKey().equals("rangriti")) {
BrixxEventModel w = dataSnapshot.getValue(BrixxEventModel.class);
updateUI(w);
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String s) {
try {
if (dataSnapshot.getKey().equals("rangriti")) {
BrixxEventModel w = dataSnapshot.getValue(BrixxEventModel.class);
updateUI(w);
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
}
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String s) {
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
};
mDatabaseReference.addChildEventListener(mChildEventListener);
}
}
use of com.manan.dev.ec2018app.Models.BrixxEventModel in project EC2018App by Manan-YMCA.
the class StarNightFragment method attachDatabaseListener.
private void attachDatabaseListener() {
if (mChildEventListener == null) {
mChildEventListener = new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
if (dataSnapshot.getKey().equals("starnight")) {
BrixxEventModel w = dataSnapshot.getValue(BrixxEventModel.class);
updateUI(w);
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String s) {
try {
if (dataSnapshot.getKey().equals("starnight")) {
BrixxEventModel w = dataSnapshot.getValue(BrixxEventModel.class);
updateUI(w);
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
}
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String s) {
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
};
mDatabaseReference.addChildEventListener(mChildEventListener);
}
}
Aggregations