Android Firebase RecyclerView图像未显示,其余信息为

Android Firebase RecyclerView图像未显示,其余信息为,android,firebase,firebase-realtime-database,picasso,firebaseui,Android,Firebase,Firebase Realtime Database,Picasso,Firebaseui,在我的activity类中,RecyclerView正在从Firebase成功地检索TextView中的信息并显示它,但是Image View并没有使用毕加索显示所需的图像 我已经尝试过使用Piccaso.get().load(“image”).into(),但它仍然没有显示图像 还包含视图持有者的活动类为: public class BeefSamosa extends AppCompatActivity { private FirebaseRecyclerAdapter<Da

在我的activity类中,RecyclerView正在从Firebase成功地检索TextView中的信息并显示它,但是Image View并没有使用毕加索显示所需的图像

我已经尝试过使用Piccaso.get().load(“image”).into(),但它仍然没有显示图像

还包含视图持有者的活动类为:

public class BeefSamosa extends AppCompatActivity {


   private FirebaseRecyclerAdapter<DataHome, DataHomeViewHolder> firebaseRecyclerAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_beef_samosa);
        //Back Button
        getSupportActionBar().setDisplayShowHomeEnabled(true);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setTitle("Beef Samosa");


        RecyclerView recyclerView = findViewById(R.id.beef_view);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));

        DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();
        Query query = rootRef.child("DataHome");

        FirebaseRecyclerOptions<DataHome> firebaseRecyclerOptions = new FirebaseRecyclerOptions.Builder<DataHome>()
                .setQuery(query, DataHome.class)
                .build();


        firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<DataHome, DataHomeViewHolder>(firebaseRecyclerOptions) {
            @Override
            protected void onBindViewHolder(@NonNull DataHomeViewHolder dataHomeViewHolder, int position, @NonNull DataHome dataHome) {
                dataHomeViewHolder.setDataHome(dataHome);
            }

            @Override
            public DataHomeViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
                View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.homedetail, parent, false);

                return new DataHomeViewHolder(view);
            }
        };
        recyclerView.setAdapter(firebaseRecyclerAdapter);

    }

    @Override
    protected void onStart() {
        super.onStart();
        firebaseRecyclerAdapter.startListening();
    }

    @Override
    protected void onStop() {
        super.onStop();

        if (firebaseRecyclerAdapter!= null) {
            firebaseRecyclerAdapter.stopListening();
        }
    }


    @Override
    public boolean onOptionsItemSelected (MenuItem item){
        int id = item.getItemId();

        if(id == android.R.id.home){
            //ends the activity
            this.finish();
        }
        return super.onOptionsItemSelected(item);
    }





    //DataHomeViewHolder class

    private class DataHomeViewHolder extends RecyclerView.ViewHolder {

        private TextView  titletext, description, ingredients, directions;
        private ImageView imagetoo;


        DataHomeViewHolder(View itemView){
            super(itemView);
            imagetoo = (ImageView) itemView.findViewById(R.id.imagetoo);
            titletext = itemView.findViewById(R.id.titletext);
            description = itemView.findViewById(R.id.description);
            ingredients = itemView.findViewById(R.id.ingredients);
            directions = itemView.findViewById(R.id.directions);
        }


        void setDataHome(DataHome DataHome) {
            Picasso.get().load("image").into(imagetoo);
            String titleto = DataHome.getTitle();
            titletext.setText(titleto);
            String descriptionto = DataHome.getDescription();
            description.setText(descriptionto);
            String ingredientsto = DataHome.getIngredients();
            ingredients.setText(ingredientsto);
            String directionsto = DataHome.getDirections();
            directions.setText(directionsto);
        }
    }
}
.load()
需要图像的url。换行

Picasso.get().load("image").into(imagetoo);

public DataHome() {}

public String title ,image, description, ingredients, directions;

public DataHome(String title, String image, String description, String ingredients, String directions){
    this.title = title;
    this.image = image;
    this.description = description;
    this.ingredients = ingredients;
    this.directions= directions;
}

public String getTitle() {
    return title;
}

public String getImage() {
    return image;
}

public String getDescription() {
    return description;
}


public String getIngredients() {
    return ingredients;
}


public String getDirections() {
    return directions;
}

}
Picasso.get().load("image").into(imagetoo);
Picasso.get().load(DataHome.getImage()).into(imagetoo);