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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:48:45+00:00 2026-05-30T13:48:45+00:00

I am developing an android application which contains a ListAtivity class and get it

  • 0

I am developing an android application which contains a ListAtivity class and get it is data as follow :

ArrayAdapter<Item> ara=new MyArrayAdapter(this,_items);

setListAdapter(ara);

And I defined MyArrayAdapter :

....
public MyArrayAdapter(Activity context, List<BirthdayContact> list) {
        super(context,R.layout.list_row,0,list);
        //super(context, R.layout.birthday_list, list);
        this.context = context;
        this.list = list;

    }
public View getView(int position, View convertView, ViewGroup parent) {
        View view = null;

        if (convertView == null) {
            LayoutInflater inflator = context.getLayoutInflater();
            view = inflator.inflate(R.layout.birthday_list_row, null);
            final ViewHolder viewHolder = new ViewHolder();
            viewHolder._cName= (TextView) view.findViewById(R.id.contact_name);
            viewHolder._cImage = (ImageView) view.findViewById(R.id.contact_image);
            viewHolder._cbirthDay=(TextView)view.findViewById(R.id.contact_birthday_remained);

            view.setTag(viewHolder);
              }

……

But the problem with this way is that you cant only assign each row`s template and you cant have other widget on list view which are not part of list of data. I mean I want to have a say a TextView which shows messages to user, and below that I show the list of rows.

Can you help me please?

  • 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-30T13:48:47+00:00Added an answer on May 30, 2026 at 1:48 pm

    If you want a different layout than a simple ListView you have the option of setting the content view to a layout file like this:

    setContentView(R.layout.layout_with_diferrent_views); // call this on the onCreate() method
    

    where R.layout.layout_with_different_views could be a xml layout like this:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    
        <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="TextView" />
    
        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Button" />
    
        <ListView
            android:id="@android:id/list"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >
        </ListView>
    
    </LinearLayout>
    

    Because you extends ListActivity you must have in the layout a ListView element with the id @android:id/list. Of course you can have a more complex layout than the one above as long as you have a ListView element with the id @android:id/list

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

Sidebar

Related Questions

Am developing android application which contains floating menu effect from left to right. I
I am developing an application for the Android platform which contains 1000+ image filters
I'm developing an android application which is to collect data and then send it
I'm developing an application for Android 1.6 and newer which contains a functionality that
We've been developing an Android application which includes Google Adsense. However there seems to
I have been developing Android application which has 3 ListView and one ContextMenu for
I am developing an android application that receives data about events from a server.
Hi I m developing android application which recognize pattern, It si working as you
I am developing an Android application which would make intense use of Bluetooth RFCOMM
I am developing a android application which is running perfectly in motorola CLIQ(i installed

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.