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

  • Home
  • SEARCH
  • 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 7951135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:28:14+00:00 2026-06-04T02:28:14+00:00

EDIT: This question is now resolved. I managed to create exactly what I needed,

  • 0

EDIT:
This question is now resolved. I managed to create exactly what I needed, you may find the results as a downloadable Eclipse project on my website: http://jordanmoore.co.uk/examples/Android/CheckableSortableMulticolumnListView.html


Original Question:
For my android application I have a set of data, currently stored in a ArrayList<Song>, where Song is an object that I have created to hold the details of a single song. This ArrayList will usually be around 200 items long.

I want to display this in such a way that the user can sort the data according to their needs. I want to do this in the sort of way that you can in Windows explorer where it lists the attributes such as name and date and lets you sort it.

The fields that I want to display and be sortable are: songName, albumName, artistName, year, trackNum, duration. I still need a reference to the Song object though so that I can access further properties of selected songs when the user selects an action.

On my Android tablet, I have a file manager application which is almost identical to my needs:
enter image description here

I’m wishing to recreate the actual part showing my images, including the greyish header with the column labels on.

I’ve been searching and searching and just can not seem to figure out where to even start with this task, hence me resulting to SO to ask if anyone can point me in the right direction or even throw me together a quick example.

Thanks,
Jordan.

  • 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-06-04T02:28:15+00:00Added an answer on June 4, 2026 at 2:28 am

    In no particular order, here’s my ideas

    Create a sort function that allows you to sort by any criteria

    A linear layout with the header, then a listview containing a linear layout with your actual data

    The header would be a horizontally-partitioned linear layout with appropriate weight values

    Create a separate layout file for the rows, have it have the same weight values as above

    In the onclicklistener for each of the headers, have it call the sort function and then re-make the list.

    Granted this is based off of some not-very-similar stuff that I did, so I don’t really have any code to help out with it.

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

Sidebar

Related Questions

EDIT: This question is now redundant since Twitter no longer supports basic auth. I've
Edit This question has gone through a few iterations by now, so feel free
EDIT: There's now a doc page on this so this question is irrelevant, also
Edit (2012-04-12): Since this question was asked it is now possible (as of jQuery
EDIT: This question is a duplicate of What is the difference between managed and
Edit: I'm looking for solution for this question now also with other programming languages.
(EDIT: This question is now outdated for my particular issue, as Google Code supports
EDIT: This question was initially too general, I think. So What I really need
EDIT: This question is about finding definitive reference to MySQL syntax on SELECT modifying
[EDIT] This question is how do I do atomic changes to entity beans with

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.