1

I'm trying to retrieve content form Firebase and place it on a TableLayout Android. Normal queries and event listeners or Firebase UI?

I'm new to both Android and Firebase so your help would be the most appreciated... thanks in advance


Alex Mamo
  • 130,605
  • 17
  • 163
  • 193
  • If you are interested, **[this](https://stackoverflow.com/questions/49383687/how-can-i-retrieve-data-from-firebase-to-my-adapter/49384849)** is how you can retrieve data from a Firebase Realtime database and display it in a `RecyclerView` using `FirebaseRecyclerAdapter`. – Alex Mamo Apr 04 '18 at 13:16
  • but the RecyclerView doesn't allow a onItemClickListener:< -my table contains clickable images, you click on one of it to access another activity so clicking and listing is rather important – user7800909 Apr 07 '18 at 14:26

1 Answers1

0

You can use the RecyclerViewand set its layout by RecylcerView.setLayoutManager(layoutManager). The layoutManager can be defined as a LinearLayoutManager which supports displaying a list in a linear fashion. But you can also utilize a GridLayoutManager, which probably comes closest to a TableLayout. More information on the LayoutManager can be found in the documentation.

For read/write methods in Firebase a good explanation is given here. It describes the most common methods.

P. Wulf
  • 18
  • 7
  • but the RecyclerView doesn't allow a onItemClickListener:< -my table contains clickable images, you click on one of it to access another activity so clicking and listing is rather important – – user7800909 Apr 07 '18 at 14:30
  • You can initialize ClickListeners for the RecyclerView and for single items in a RecyclerView. See: https://stackoverflow.com/questions/24471109/recyclerview-onclick/26196831#26196831 – P. Wulf Apr 09 '18 at 06:35