Besitzer wird nun angezeigt
This commit is contained in:
		@@ -17,6 +17,9 @@ import com.google.firebase.auth.FirebaseAuth;
 | 
			
		||||
import com.google.firebase.auth.FirebaseUser;
 | 
			
		||||
import com.squareup.picasso.Picasso;
 | 
			
		||||
 | 
			
		||||
import org.json.JSONException;
 | 
			
		||||
 | 
			
		||||
import java.sql.SQLException;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import at.smartshopper.smartshopper.R;
 | 
			
		||||
@@ -107,23 +110,20 @@ public class ShoppinglistSharedAdapter extends RecyclerView.Adapter<Shoppinglist
 | 
			
		||||
 | 
			
		||||
        holder.shoppinglistColor.setBackgroundColor(cardcolor);
 | 
			
		||||
 | 
			
		||||
        FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
 | 
			
		||||
        if (user != null) {
 | 
			
		||||
            // Name, email address, and profile photo Url
 | 
			
		||||
            String name = user.getDisplayName();
 | 
			
		||||
            Uri photoUrl = user.getPhotoUrl();
 | 
			
		||||
            holder.ownerName.setText(name);
 | 
			
		||||
            Picasso.get().load(photoUrl).resize(250, 250).transform(new RoundCornersTransformation(30, 30, true, true)).into(holder.imageView);
 | 
			
		||||
            // holder.imageView.setImageDrawable(Drawable.createFromPath("@drawable/common_google_signin_btn_icon_dark"));
 | 
			
		||||
 | 
			
		||||
            // Check if user's email is verified
 | 
			
		||||
 | 
			
		||||
            // The user's ID, unique to the Firebase project. Do NOT use this value to
 | 
			
		||||
            // authenticate with your backend server, if you have one. Use
 | 
			
		||||
            // FirebaseUser.getIdToken() instead.
 | 
			
		||||
        try {
 | 
			
		||||
            Member admin = db.getAdmin(shoppinglist.getSlId());
 | 
			
		||||
            Picasso.get().load(admin.getPic()).resize(250, 250).transform(new RoundCornersTransformation(30, 30, true, true)).into(holder.imageView);
 | 
			
		||||
            holder.ownerName.setText(admin.getName());
 | 
			
		||||
        } catch (SQLException e) {
 | 
			
		||||
            e.printStackTrace();
 | 
			
		||||
        } catch (JSONException e) {
 | 
			
		||||
            e.printStackTrace();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user