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 6093643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:35:02+00:00 2026-05-23T12:35:02+00:00

In my current application, which is for in-car use, I am displaying a series

  • 0

In my current application, which is for in-car use, I am displaying a series of Views (which represent gauges) at arbitrary locations within a RelativeLayout (the dashboard). There is obviously an amount of backing data that describes the positioning of those gauges, their attributes, the measurement data that they display, and so forth.

At this point, it would seem sensible for me to create a separate adapter class to contain the code that translates the backing data into the appropriate gauge Views. This would follow the existing Android pattern doing things, whereby various types of View (ListView, Spinner, etc.) accept an appropriate subclass of BaseAdapter to take care of interfacing to the backing data.

What I was considering doing is extending RelativeLayout so that it accepts an Adapter and calls the standard Adapter methods (like getCount(), getView(), and so forth). My custom Adapter would apply appropriate LayoutParams to each View so that it is appropriately positioned in the RelativeLayout.

So, rather than being a specific question as such, I’m just curious to know whether using the Adapter interface is suitable in this instance. What bugs me slightly is that in the Android library, Adapters seem to be commonly used for Views that present information in a list format. Do you think that subclassing Adapter (or BaseAdapter) sounds like a good pattern for what I’m doing, or is it going against the grain somewhat by using it in a situation where data isn’t being presented in a list?

  • 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-23T12:35:03+00:00Added an answer on May 23, 2026 at 12:35 pm

    I’m just curious to know whether using the Adapter interface is suitable in this instance

    IMHO, no, unless you have an arbitrary number of gauges. AdapterView is designed around supporting 0-N children using a recycling pattern to only require a few actual children. Adapter is designed around being used with AdapterView.

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

Sidebar

Related Questions

I have a C# application which shows the current time in a transparent .NET
i have created an application which show data from user current location. I want
I'm not sure which is these is appropriate for my current application. I need
I have a current system which is build as a Windows Application, and does
I'm writing an application which will display the current image seen by a camera
I have an .NET application which is run with default rights as the current
I am building a local intranet web application which uses the current user's AD
I have this application which compares current date to a parsed date from an
I am writting an application which needs to find the current location. The code
I have an application which needs to be able to write to Any User/Current

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.