The Imp The Imp - 1 year ago 71
Android Question

Can the data be displayed without using Adapter in Android

I am new to android programming.

I have managed to create an app to save data given by user. But now I want to display data in new activity. I am clueless about what should I do. My output on the new activity should look like the following.

Displayed Result

Since I only have the two rows I guess it is OK avoid using adapter, but I have not clue how to accomplish this. Please help me. As I already said I am new to android programming. So something that you might think is obvious will not feel as obvious to me as it does to you yet.

Answer Source

In my opinion your question has two parts:

1- How you send data to the new activity?

2- How to display data in the new activity?

for the first question you can do in couple of ways but two of them I mention here:

  • You can put the data in a Bundle and attach the bundle to the Intent
  • You can use ContentProvider and access your data from another application using a URI

for the second part you can use different layouts but the most popular are:

  • GridView
  • RecyclerView

If your program scales (not stuck in two students), you need to use adapters. You find lots of examples and tutorials on the internet for them

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download