Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1057141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:49:16+00:00 2026-05-16T17:49:16+00:00

First off I’m really new to android (< 4 days). I’m trying to wrap

  • 0

First off I’m really new to android (< 4 days).

I’m trying to wrap my head around how database data is linked to Views and widgets.

I’ve done a few tutorials and I’ve noticed that Adapters are used to link AdapterViews which are (as I understand it) Views which contain a bunch of identical subviews (eg lists, gallery, etc). So the Adapter is responsible for creating those subviews and populating the data for each one (correct me if I’m wrong).

Now let’s say I have a list view which lists Hotels for example. Each row in the list has the Hotel’s name and a basic rating (eg 5 star). Now when you tap on a hotel in the list a new activity shows up showing the details of that particular hotel. All the data is in a database. I understand that you have an adapter manage the data<->view link for the list, but what’s the best way to then manage data for the hotel details view (which is not a list but just a couple of text views and an image for example)?

Is it best to just pass the ID in the intent and then have the details activity fetch the data from the DB on its own (in this case do I store the query in the details activity?)? Or do you get all the fields you need and put those in the intent directly? Do you need an adapter for a view which doesn’t actually generate lots of similar subviews?

I guess a summary of my question is what do you use instead of an adapter when you’re not dealing with adapterviews but just simple straightforward single views.

Thanks for any help you can provide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:49:16+00:00Added an answer on May 16, 2026 at 5:49 pm

    Is it best to just pass the ID in the intent and then have the details activity fetch the data from the DB
    on its own (in this case do I store the query in the details activity?)?

    That is what I would recommend.

    Do you need an adapter for a view which doesn’t actually generate lots of similar subviews?

    No. You only use an Adapter with an AdapterView (ListView, Spinner, etc.)

    I guess a summary of my question is what do you use instead of an adapter when you’re not dealing with
    adapterviews but just simple straightforward single views.

    Just the Cursor from the database. Get the fields from the (one) row in the Cursor, put them in the EditText widgets, and when the user makes changes, update the row.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've found several jQuery syntaxes for nullifying the enter on a form. First one:
I'm trying to build a C++ extension for python using swig. I've followed the
I was reading JavaScript: The Good Parts and the author mentions that JavaScript is
I am attempting to pull some information from my tnsnames file using regex. I
This is beyond both making sense and my control. That being said here is
Let say I have the following desire, to simplify the IConvertible's to allow me
After having read Ian Boyd 's constructor series questions ( 1 , 2 ,
I am using a 3rd-party rotator object, which is providing a smooth, random rotation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.