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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:54:26+00:00 2026-05-26T13:54:26+00:00

I have a custom adapter which formats for me, alphabet headers and then corresponding

  • 0

I have a custom adapter which formats for me, alphabet headers and then corresponding names underthem, but I want to put a unique footer at the bottom that will display the number of contacts, for example “Total number of contacts in list: 21”

 class LetterAdapter extends ArrayAdapter<String> {
    LetterAdapter() {
        super(ContactProjectActivity.this, R.layout.row, R.id.label, sortedNames);
    }

    public View getView(int position, View convertView, ViewGroup parent) {
        View row = convertView;

        if (row == null) {
            LayoutInflater inflater=getLayoutInflater();
            row = inflater.inflate(R.layout.row, parent, false);
        }

        TextView label = (TextView) row.findViewById(R.id.label);   
        label.setText(sortedNames.get(position));

        if (sortedNames.get(position).length() == 1) {
            //label.setText("The size is " + searchNames.size());
            label.setTextSize(15);
            row.setBackgroundColor(Color.GRAY);
        }
        else {
            label.setTextSize(20);
            label.setTextColor(Color.BLACK);
            row.setBackgroundColor(Color.WHITE);
        }
        return(row);

    }
}

I am extending ListActivity so I don’t have a ListView variable in my code. Any code snippets or suggestions would be helpful.

I want to customize the footer also, with its own background color (similar to how I did the letter headers in the code).

  • 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-26T13:54:27+00:00Added an answer on May 26, 2026 at 1:54 pm

    You could get the ListView from you ListActivity with the method getListView() and then try to set your footer view before you set the adapter.

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

Sidebar

Related Questions

I have a custom ListView adapter which implements an ImageThreadLoader class. Unfortunately, the class
I have a custom ListView adapter which implements an ImageThreadLoader class. Unfortunately the class
i have a ListView for which i have made a custom adapter which extends
I have an extended from BaseAdapter class which used as a custom Adapter for
I have ListView with custom Adapter which supplies View to ListView in this way:
I have a ListView which uses a custom adapter to display rows of data.
I have a ListView with a custom Adapter that extends ArrayAdapter. It's a ArrayAdapter
I have custom errors configured in my web.config, but IIS 6.0 is returning the
I have custom classes that I currently instantiate within App.xaml as resources. I want
We have custom headers in the Silverlight DataGrid using the ContentTemplate. We've got a

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.