daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Mar 18th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DatabaseReference databaseReference = firebaseDatabase.getReference(firebaseAuth.getUid());
  2.  
  3.     databaseReference.addValueEventListener(new ValueEventListener() {
  4.         @Override
  5.         public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
  6.             UserProfile userProfile = dataSnapshot.getValue(UserProfile.class);
  7.             //profileName.setText(userProfile.getName());
  8.  
  9.  
  10.                 pasteName = userProfile.getName();
  11.                 pasteEmail = userProfile.getEmail();
  12.                 testCase.setText(pasteName);//THIS IS WORKING
  13.  
  14.  
  15.         }
  16.  
  17.         @Override
  18.         public void onCancelled(@NonNull DatabaseError databaseError) {
  19.             Toast.makeText(LoggedIn.this,"Problem Fetching Data",Toast.LENGTH_SHORT).show();
  20.         }
  21.     });
  22.  
  23.  
  24.     toolbar = (Toolbar)findViewById(R.id.toolbarMain);
  25.     toolbar.setTitle(pasteName);//NOT WORKING
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top