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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:18:44+00:00 2026-05-26T11:18:44+00:00

here is my getView method of my custom adapter: public View getView(int position, View

  • 0

here is my getView method of my custom adapter:

public View getView(int position, View convertView, ViewGroup viewGroup) {
            SingleEvent entry = listSingleEvent.get(position);
            if (convertView == null) {
                LayoutInflater inflater = (LayoutInflater) context
                        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                convertView = inflater.inflate(R.layout.single_event_row, null);
            }
            TextView titleTextView = (TextView) convertView.findViewById(R.id.titleTextView);
            titleTextView.setText(entry.getTitle());

            TextView byTextView = (TextView) convertView.findViewById(R.id.byTextView);
            byTextView.setText(entry.getBy());

            TextView dateTextView= (TextView) convertView.findViewById(R.id.dateTextView);
            dateTextView.setText(entry.getDate());

            TextView descTextView= (TextView) convertView.findViewById(R.id.descTextView);
            descTextView.setText(entry.getDesc());


            return convertView;
        }

Here is the row xml:

<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent" android:weightSum="1">
    <TextView android:layout_height="wrap_content" android:id="@+id/titleTextView" android:text="TextView" android:layout_width="fill_parent"></TextView>
    <TextView android:layout_height="wrap_content" android:id="@+id/byTextView" android:text="TextView" android:layout_width="fill_parent"></TextView>
    <TextView android:layout_height="wrap_content" android:id="@+id/dateTextView" android:text="TextView" android:layout_width="fill_parent"></TextView>
    <TextView android:id="@+id/descTextView" android:text="TextView" android:layout_width="fill_parent" android:layout_height="wrap_content"></TextView>

</LinearLayout>

Changing the LinearLayout height to 300dp or something doesnt do anything. The row still just hugs the amount of content.

Is there a way to set the row height in the getView method?

  • 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-26T11:18:44+00:00Added an answer on May 26, 2026 at 11:18 am

    I think what you have to do is make the individual items in each row bigger if you want each row in the ListView to be bigger. I’m pretty sure the ListView controls how big each row is. This makes sense right? It’s in charge of figuring out how to layout each row so it make sense it determines how big each one should be.

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

Sidebar

Related Questions

I have list view with custom array adapter. I want to get items click
Hello stackoverflow community, I'm getting a NPE in my getView method of my custom
I have a custom list adapter: class ResultsListAdapter extends ArrayAdapter<RecordItem> { in the overridden
I have an ArrayList of items that are linked to a custom Adapter. The
In my ArrayAdapter class I capture the context passed in. Then int the getView
I have overrode the getView() method in ArrayAdapter . I was wondering if there
I've created a custom ListView adapter/item. The item contains a CheckedTextView and a TextView.
I have a custom ListView Adapter , with which I'm creating rows for a
I have an extended from BaseAdapter class which used as a custom Adapter for
Can you please help me understand the adapter with custom data : I was

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.