Application does not show Firebase - Recyclerview [on hold]

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Application does not show Firebase - Recyclerview [on hold]



I am having a big problem, my application does not display the data that is in the firebase, but also does not present any error, they can help me:



This is my Fragment:


View v;
private RecyclerView mRecyclerView;
private List<Adapter> listStore;
private DatabaseReference mStoreDatabase;
private RecyclerViewAdapter recyclerViewAdapter;
private RecyclerView mResultList;

public Sema_Fragment() {
// Required empty public constructor
}

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
v = inflater.inflate(R.layout.fragment_sema_, container,false);
mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler_view);
recyclerViewAdapter = new RecyclerViewAdapter(getContext(),listStore);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mRecyclerView.setAdapter(recyclerViewAdapter);

return v;
}


@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

listStore = new ArrayList<>();

mStoreDatabase = FirebaseDatabase.getInstance().getReference("VAzdMWafK6cyhmJnOI4br5xiQg93");
mStoreDatabase.keepSynced(true);
mStoreDatabase.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
for(DataSnapshot store : dataSnapshot.getChildren()){
listStore.add(store.getValue(Adapter.class));
}
recyclerViewAdapter.notifyDataSetChanged();
}

@Override
public void onCancelled(DatabaseError databaseError) {
}
});
}

@Override
public void onStart() {
super.onStart();

FirebaseRecyclerOptions<Adapter> options = new FirebaseRecyclerOptions.Builder<Adapter>()
.setQuery(mStoreDatabase, Adapter.class)
.build();

FirebaseRecyclerAdapter adapter = new FirebaseRecyclerAdapter<Adapter, AdapterViewHolder>(options) {

@Override
protected void onBindViewHolder(@NonNull AdapterViewHolder holder, int position, @NonNull Adapter model) {

holder.setDetails(getActivity().getApplicationContext(),
model.getProduct_name(),
model.getProduct_photo());

}

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

return new AdapterViewHolder(view);
}
};

mResultList.setAdapter(adapter);
}
// View Holder Class
public static class AdapterViewHolder extends RecyclerView.ViewHolder{

View mView;

public AdapterViewHolder(View itemView) {
super(itemView);

mView = itemView;
}

public void setDetails(Context applicationContext, String product_name, String product_photo) {

TextView productname = (TextView) mView.findViewById(R.id.product_name);
ImageView productphoto = (ImageView) mView.findViewById(R.id.product_photo_details);

productname.setText(product_name);
Glide.with(applicationContext).load(product_photo).into(productphoto);
}
}



}



This is my class:


public class Adapter {

private String Product_name;
private String Product_descript;
private String Product_price;
private String Product_photo;

public Adapter() {

}

public Adapter(String name, String descript, String price, String photo) {
this.Product_name = name;
this.Product_descript = descript;
this.Product_price = price;
this.Product_photo = photo;
}

public String getProduct_name() {
return Product_name;
}

public String getProduct_descript() {
return Product_descript;
}

public String getProduct_price() {
return Product_price;
}

public String getProduct_photo() {
return Product_photo;
}

public void setProduct_name(String product_name) {
Product_name = product_name;
}

public void setProduct_descript(String product_descript) {
Product_descript = product_descript;
}

public void setProduct_price(String product_price) {
Product_price = product_price;
}

public void setProduct_photo(String product_photo) {
Product_photo = product_photo;
}



And this is a picture in my firebase tab



enter image description here



And this is msg box android studio



E/RecyclerView: No adapter attached; skipping layout


No adapter attached; skipping layout



Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.





Este site aceita perguntas e respostas apenas em inglês. Por favor, traduza seu post ou considere sua pergunta no Stack Overflow em Português (This site accepts questions and answers in English only. Please translate your post or consider asking your question at Stack Overflow in Português.)
– Ed Cottrell
42 mins ago




bQZPeHsI KE56U8d T,0jxXcZejnUSMXf0jA2FoZbqk67E Or66O63l2h
TsCZX1N 6,w0ez8,j70Ll778FL ji,ExT9I,Qxdh7YMReXtyU fNewAl ZQdZ0zg

Popular posts from this blog

Makefile test if variable is not empty

Visual Studio Code: How to configure includePath for better IntelliSense results

Will Oldham